Function at 0x502900
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x22c
mov eax, dword [0x562850]
xor eax, esp
mov dword [esp + 0x228], eax
mov eax, dword [esp + 0x234]
xorps xmm0, xmm0
mov ecx, dword [esp + 0x240]
push ebx
mov ebx, dword [esp + 0x23c]
push ebp
push esi
mov esi, dword [esp + 0x248]
xor ebp, ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0xc], 0
movlpd qword [esp + 0x14], xmm0
mov dword [esp + 0x10], ebp
mov dword [eax], ebp
push edi
mov edi, dword [esp + 0x240]
mov dword [esp + 0x20], edi
test ebx, ebx
je 0x502e48
push edi
call fcn.004d5290
add esp, 4
push eax
push edi
call fcn.004d5290
add esp, 4
push eax
push str._________________________08x_08x
call fcn.004dffc0
add esp, 0xc
mov dword [esp + 0x24], eax
test eax, eax
jne 0x502999
lea eax, [ebp + 0x1b]
jmp 0x502b11
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, [esp + 0x1c]
push 0
push eax
call fcn.00502730
mov esi, eax
add esp, 0x14
test esi, esi
je 0x5029d1
push dword [esp + 0x24]
call dword [0x563b64]
add esp, 4
jmp 0x502b0f
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x18]
or eax, dword [esp + 0x1c]
je 0x502a0b
push 0x53ee18
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00502730
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502af1
push dword [esp + 0x24]
lea eax, [esp + 0x1c]
push str.___s_r_n
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00502730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x502af1
push str.Content_Disposition:_form_data__name_
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00502730
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502af1
lea eax, [esp + 0x18]
push eax
mov eax, dword [ebx + 8]
cdq
push edx
push eax
push dword [ebx + 4]
lea eax, [esp + 0x20]
push esi
push eax
call fcn.00502550
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x502af1
push 0x53c0e8
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00502730
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502af1
cmp dword [ebx + 0x24], eax
je 0x502b2a
push ebp
call dword [0x563b64]
push edi
call fcn.004d5290
add esp, 8
push eax
push edi
call fcn.004d5290
add esp, 4
push eax
push str._________________________08x_08x
call fcn.004dffc0
mov edi, eax
add esp, 0xc
mov dword [esp + 0x14], edi
test edi, edi
je 0x502e4f
push edi
push str._r_nContent_Type:_multipart_mixed__boundary_s_r_n
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00502730
mov esi, eax
add esp, 0x10
test esi, esi
je 0x502b2e
mov ebp, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push eax
call fcn.00502890
push ebp
call dword [0x563b64]
push dword [esp + 0x2c]
call dword [0x563b64]
add esp, 0xc
mov eax, esi
mov ecx, dword [esp + 0x238]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ba5ad
add esp, 0x22c
ret
mov edi, dword [esp + 0x14]
mov ebp, ebx
cmp dword [ebx + 0x24], 0
je 0x502b61
push edi
push str._r_n___s_r_nContent_Disposition:_attachment
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00502730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x502aed
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push ebp
jmp 0x502b7d
mov eax, dword [ebx + 0x28]
test al, 0x51
je 0x502b8f
cmp dword [ebx + 0x2c], 0
jne 0x502b72
test al, 1
je 0x502b87
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00502e60
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502aed
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x502bb8
push eax
push str._r_nContent_Type:__s
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00502730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x502aed
mov edi, dword [ebp + 0x20]
test edi, edi
je 0x502bec
nop
push dword [edi]
lea eax, [esp + 0x1c]
push str._r_n_s
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00502730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x502aed
mov edi, dword [edi + 4]
test edi, edi
jne 0x502bc0
jmp 0x502bf4
test esi, esi
jne 0x502aed
push str._r_n_r_n
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00502730
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502aed
mov eax, dword [ebx + 0x28]
test al, 3
jne 0x502cba
test al, 0x10
je 0x502c63
lea eax, [esp + 0x18]
push eax
mov eax, dword [ebx + 0x18]
cdq
push edx
push eax
push dword [ebx + 0x14]
push 1
lea eax, [esp + 0x24]
push eax
call fcn.00502550
add esp, 0x18
mov esi, eax
mov edi, dword [esp + 0x20]
mov ebp, dword [ebp + 0x24]
test ebp, ebp
je 0x502db1
test esi, esi
jne 0x502aed
mov edi, dword [esp + 0x14]
jmp 0x502b30
test al, 0x40
je 0x502c91
test al, al
jns 0x502c7f
mov edx, dword [ebx + 0x3c]
lea ecx, [esp + 0x18]
mov eax, dword [ebx + 0x38]
push ecx
push edx
push eax
push dword [ebx + 0x30]
push 2
jmp 0x502c34
mov eax, dword [ebx + 0x10]
lea ecx, [esp + 0x18]
push ecx
cdq
push edx
push eax
push dword [ebx + 0x30]
push 2
jmp 0x502c34
test al, al
jns 0x502ca7
mov edx, dword [ebx + 0x3c]
lea ecx, [esp + 0x18]
mov eax, dword [ebx + 0x38]
push ecx
push edx
push eax
push dword [ebx + 0xc]
jmp 0x502c32
mov eax, dword [ebx + 0x10]
lea ecx, [esp + 0x18]
push ecx
cdq
push edx
push eax
push dword [ebx + 0xc]
jmp 0x502c32
push dword [ebp + 0xc]
push 0x530fa0
call fcn.004ea150
add esp, 8
test eax, eax
je 0x502cd5
call fcn.004bb641
jmp 0x502ce5
push 0x55a940
push dword [ebp + 0xc]
call fcn.004bde1a
add esp, 8
mov edi, eax
test edi, edi
je 0x502d84
call fcn.004bb641
push edi
cmp edi, eax
je 0x502d1e
call fcn.004bd940
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push dword [ebp + 0xc]
lea eax, [esp + 0x24]
push 3
push eax
call fcn.00502550
add esp, 0x1c
jmp 0x502c41
push 0x200
lea eax, [esp + 0x40]
push 1
push eax
call fcn.004bdff4
add esp, 0x10
test eax, eax
je 0x502c43
lea ebx, [ebx]
lea ecx, [esp + 0x18]
push ecx
push 0
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x20]
push 1
push eax
call fcn.00502550
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x502c43
push edi
push 0x200
lea eax, [esp + 0x40]
push 1
push eax
call fcn.004bdff4
add esp, 0x10
test eax, eax
jne 0x502d40
jmp 0x502c43
mov edi, dword [esp + 0x20]
test edi, edi
je 0x502d9d
push dword [ebp + 0xc]
push str.couldnt_open_file___s_
push edi
call fcn.004ddeb0
add esp, 0xc
mov eax, dword [esp + 0x28]
mov esi, 0x1a
mov dword [eax], 0
jmp 0x502c47
mov ebp, dword [esp + 0x14]
test esi, esi
jne 0x502af1
cmp dword [ebx + 0x24], esi
je 0x502de4
push ebp
push str._r_n___s__
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00502730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x502af1
mov ebx, dword [ebx]
test ebx, ebx
jne 0x5029e0
test esi, esi
jne 0x502af1
mov ebx, dword [esp + 0x24]
lea eax, [esp + 0x18]
push ebx
push str._r_n___s___r_n
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00502730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x502af1
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
push ebp
mov dword [ecx], eax
mov eax, dword [esp + 0x20]
mov dword [ecx + 4], eax
call dword [0x563b64]
push ebx
call dword [0x563b64]
mov eax, dword [esp + 0x30]
add esp, 8
mov ecx, dword [esp + 0x34]
mov dword [eax], ecx
xor eax, eax
jmp 0x502b11
mov esi, 0x1b
jmp 0x502aed