Function at 0x501040
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x5524b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x228], ecx
mov dword [ebp - 0x208], 0
movlpd qword [ebp - 0x210], xmm0
mov dword [ebp - 0x21c], 0
mov dword [eax], 0
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x214], edi
test ebx, ebx
je 0x50163e
push edi
call fcn.00501690
add esp, 4
mov dword [ebp - 0x220], eax
test eax, eax
jne 0x5010cd
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4bd0
mov esp, ebp
pop ebp
ret
push eax
test esi, esi
mov eax, str.Content_Type:_multipart_form_data
cmovne eax, esi
push eax
push str._s__boundary_s_r_n
lea eax, [ebp - 0x208]
push 0
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x14
test esi, esi
je 0x501117
push dword [ebp - 0x220]
call dword [0x552e44]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4bd0
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x208]
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x230], eax
nop dword [eax]
mov eax, dword [ebp - 0x210]
or eax, dword [ebp - 0x20c]
je 0x501163
push 0x535a80
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x501656
push dword [ebp - 0x220]
lea eax, [ebp - 0x210]
push str.___s_r_n
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x501656
push str.Content_Disposition:_form_data__name_
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x501656
lea eax, [ebp - 0x210]
push eax
mov eax, dword [ebx + 8]
cdq
push edx
push eax
push dword [ebx + 4]
lea eax, [ebp - 0x208]
push 1
push eax
call fcn.00500c50
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x501656
push 0x53dd84
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x501656
cmp dword [ebx + 0x24], eax
je 0x501251
push dword [ebp - 0x21c]
call dword [0x552e44]
push edi
call fcn.00501690
add esp, 8
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x501651
push eax
push str._r_nContent_Type:_multipart_mixed__boundary_s_r_n
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x501656
mov edi, ebx
mov dword [ebp - 0x218], edi
nop dword [eax]
cmp dword [ebx + 0x24], 0
je 0x5012a2
push dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push str._r_n___s_r_nContent_Disposition:_attachment
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x501656
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
push edi
jmp 0x5012c2
mov eax, dword [ebx + 0x28]
test al, 0x51
je 0x5012d4
cmp dword [ebx + 0x2c], 0
jne 0x5012b3
test al, 1
je 0x5012cc
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
push ebx
call fcn.005016d0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x501656
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x501301
push eax
push str._r_nContent_Type:__s
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x501656
mov edi, dword [edi + 0x20]
test edi, edi
je 0x501340
nop dword [eax + eax]
push dword [edi]
lea eax, [ebp - 0x210]
push str._r_n_s
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x501656
mov edi, dword [edi + 4]
test edi, edi
jne 0x501310
jmp 0x501348
test esi, esi
jne 0x501656
push str._r_n_r_n
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x501656
mov eax, dword [ebx + 0x28]
test al, 3
jne 0x50142d
test al, 0x10
je 0x5013cb
lea eax, [ebp - 0x210]
push eax
mov eax, dword [ebx + 0x18]
cdq
push edx
push eax
push dword [ebx + 0x14]
push 2
lea eax, [ebp - 0x208]
push eax
call fcn.00500c50
add esp, 0x18
mov esi, eax
mov edi, dword [ebp - 0x214]
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x218], eax
test eax, eax
je 0x501595
test esi, esi
jne 0x501656
mov edi, eax
jmp 0x501260
test al, 0x40
je 0x5013fd
test al, al
jns 0x5013e9
mov edx, dword [ebx + 0x3c]
lea ecx, [ebp - 0x210]
mov eax, dword [ebx + 0x38]
push ecx
push edx
push eax
push dword [ebx + 0x30]
push 3
jmp 0x50138e
mov eax, dword [ebx + 0x10]
lea ecx, [ebp - 0x210]
push ecx
cdq
push edx
push eax
push dword [ebx + 0x30]
push 3
jmp 0x50138e
test al, al
jns 0x501418
mov edx, dword [ebx + 0x3c]
lea ecx, [ebp - 0x210]
mov eax, dword [ebx + 0x38]
push ecx
push edx
push eax
push dword [ebx + 0xc]
jmp 0x50138c
mov eax, dword [ebx + 0x10]
lea ecx, [ebp - 0x210]
push ecx
cdq
push edx
push eax
push dword [ebx + 0xc]
jmp 0x50138c
mov edi, dword [ebp - 0x218]
mov eax, 0x53f59c
mov edi, dword [edi + 0xc]
mov ecx, edi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x501460
test dl, dl
je 0x50145c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x501460
add eax, 2
add ecx, 2
test dl, dl
jne 0x501440
xor eax, eax
jmp 0x501465
sbb eax, eax
or eax, 1
test eax, eax
jne 0x501474
push eax
call fcn.004af2a6
add esp, 4
jmp 0x501482
push 0x51dea8
push edi
call fcn.004b2945
add esp, 8
mov edi, eax
test edi, edi
je 0x50155e
push 0
call fcn.004af2a6
add esp, 4
push edi
cmp edi, eax
je 0x5014ca
call fcn.004b26c0
lea eax, [ebp - 0x210]
push eax
mov eax, dword [ebp - 0x218]
push 0
push 0
push dword [eax + 0xc]
lea eax, [ebp - 0x208]
push 4
push eax
call fcn.00500c50
add esp, 0x1c
jmp 0x50139d
push 0x200
lea eax, [ebp - 0x204]
push 1
push eax
call fcn.004b2b6f
add esp, 0x10
test eax, eax
je 0x50139f
nop dword [eax + eax]
lea ecx, [ebp - 0x210]
push ecx
push 0
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x208]
push 2
push eax
call fcn.00500c50
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x50139f
push edi
call fcn.004b2740
add esp, 4
test eax, eax
jne 0x50139f
push edi
call fcn.004b276b
add esp, 4
test eax, eax
jne 0x50139f
push edi
push 0x200
lea eax, [ebp - 0x204]
push 1
push eax
call fcn.004b2b6f
add esp, 0x10
test eax, eax
jne 0x5014f0
jmp 0x50139f
mov edi, dword [ebp - 0x214]
test edi, edi
je 0x50157f
mov eax, dword [ebp - 0x218]
push dword [eax + 0xc]
push str.couldnt_open_file___s_
push edi
call fcn.004e18c0
add esp, 0xc
mov eax, dword [ebp - 0x224]
mov esi, 0x1a
mov dword [eax], 0
jmp 0x5013a5
test esi, esi
jne 0x501656
cmp dword [ebx + 0x24], esi
je 0x5015cd
push dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push str._r_n___s__
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x501656
mov ebx, dword [ebx]
test ebx, ebx
jne 0x501130
test esi, esi
jne 0x501656
mov ebx, dword [ebp - 0x220]
lea eax, [ebp - 0x210]
push ebx
push str._r_n___s___r_n
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00500e50
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x501656
mov ecx, dword [ebp - 0x228]
mov eax, dword [ebp - 0x210]
push dword [ebp - 0x21c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x20c]
mov dword [ecx + 4], eax
call dword [0x552e44]
push ebx
call dword [0x552e44]
mov eax, dword [ebp - 0x224]
add esp, 8
mov ecx, dword [ebp - 0x22c]
mov dword [eax], ecx
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4bd0
mov esp, ebp
pop ebp
ret
mov esi, 0x1b
lea eax, [ebp - 0x230]
push eax
call fcn.00500fd0
push dword [ebp - 0x21c]
call dword [0x552e44]
push dword [ebp - 0x220]
call dword [0x552e44]
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, esi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a4bd0
mov esp, ebp
pop ebp
ret