Function at 0x519990
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 8], eax
and dword [ebp - 0x214], 0
mov eax, edx
mov edx, dword [ebp + 0x10]
xorps xmm0, xmm0
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
and dword [eax], ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x22c], ecx
mov dword [ebp - 0x230], edx
movlpd qword [ebp - 0x21c], xmm0
mov dword [ebp - 0x224], ebx
test edi, edi
jne 0x5199ea
xor eax, eax
jmp 0x519e18
call fcn.0051a008
mov dword [ebp - 0x210], eax
test eax, eax
jne 0x519a01
push 0x1b
pop eax
jmp 0x519e18
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 - 0x214]
push 0
push eax
call fcn.00519898
mov esi, eax
add esp, 0x14
test esi, esi
je 0x519a34
push dword [ebp - 0x210]
jmp 0x519e0f
mov eax, dword [ebp - 0x214]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], eax
mov eax, dword [ebp - 0x21c]
or eax, dword [ebp - 0x218]
je 0x519a79
push 0x57fbc0
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x519deb
push dword [ebp - 0x210]
lea eax, [ebp - 0x21c]
push str.___s_r_n
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x519deb
push str.Content_Disposition:_form_data__name_
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x519deb
lea eax, [ebp - 0x21c]
xor edx, edx
push eax
push dword [edi + 8]
lea ecx, [ebp - 0x214]
push dword [edi + 4]
call fcn.0051979a
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x519deb
push 0x57dcc0
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x519deb
cmp dword [edi + 0x24], eax
je 0x519b61
test ebx, ebx
je 0x519b26
push ebx
call dword [0x5b6c48]
pop ecx
call fcn.0051a008
mov ebx, eax
mov dword [ebp - 0x224], ebx
test ebx, ebx
je 0x519ed2
push ebx
push str._r_nContent_Type:_multipart_mixed__boundary_s_r_n
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x519deb
mov eax, edi
mov dword [ebp - 0x220], edi
cmp dword [edi + 0x24], 0
je 0x519bbc
xor ebx, ebx
cmp dword [eax + 0x2c], ebx
jne 0x519b8e
mov ecx, dword [eax + 0xc]
call fcn.00519960
mov ebx, eax
test ebx, ebx
je 0x519ed7
mov eax, dword [ebp - 0x220]
cmp dword [eax + 0x2c], 0
mov ecx, ebx
cmovne ecx, dword [eax + 0x2c]
lea eax, [ebp - 0x21c]
push ecx
push dword [ebp - 0x224]
push str._r_n___s_r_nContent_Disposition:_attachment__filename__s_
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
add esp, 0x14
jmp 0x519c07
test byte [edi + 0x28], 0x51
je 0x519c1d
mov eax, dword [edi + 0x2c]
test eax, eax
jne 0x519bdf
test byte [edi + 0x28], 1
je 0x519c15
test eax, eax
jne 0x519bdf
mov ecx, dword [edi + 0xc]
call fcn.00519960
mov ebx, eax
jmp 0x519be1
xor ebx, ebx
cmp dword [edi + 0x2c], 0
mov eax, ebx
cmovne eax, dword [edi + 0x2c]
push eax
push str.__filename__s_
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
add esp, 0x10
mov esi, eax
test ebx, ebx
je 0x519c15
push ebx
call dword [0x5b6c48]
pop ecx
test esi, esi
jne 0x519deb
mov ebx, dword [ebp - 0x220]
cmp dword [ebx + 0x1c], 0
je 0x519c51
push dword [ebx + 0x1c]
lea eax, [ebp - 0x21c]
push str._r_nContent_Type:__s
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x519deb
mov ebx, dword [ebx + 0x20]
jmp 0x519c80
push dword [ebx]
lea eax, [ebp - 0x21c]
push str._r_n_s
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x519deb
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x519c56
test esi, esi
jne 0x519deb
push str._r_n_r_n
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x519deb
test byte [edi + 0x28], 3
jne 0x519cf8
test byte [edi + 0x28], 0x10
lea eax, [ebp - 0x21c]
lea ecx, [ebp - 0x214]
push eax
je 0x519cd2
push dword [edi + 0x18]
push dword [edi + 0x14]
jmp 0x519ce6
test byte [edi + 0x28], 0x40
push dword [edi + 0x10]
je 0x519ce3
push dword [edi + 0x30]
push 2
pop edx
jmp 0x519ce9
push dword [edi + 0xc]
xor edx, edx
inc edx
call fcn.0051979a
add esp, 0xc
mov esi, eax
jmp 0x519dd0
mov ebx, dword [ebp - 0x220]
push dword [ebx + 0xc]
push 0x584090
call dword [sym.imp.MSVCR120.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x519d1a
call dword [sym.imp.MSVCR120.dll___iob_func]
jmp 0x519d2a
push 0x58e158
push dword [ebx + 0xc]
call dword [sym.imp.MSVCR120.dll_fopen]
pop ecx
pop ecx
mov ebx, eax
test ebx, ebx
je 0x519da3
call dword [sym.imp.MSVCR120.dll___iob_func]
push ebx
cmp ebx, eax
je 0x519d86
call dword [sym.imp.MSVCR120.dll_fclose]
mov ebx, dword [ebp - 0x220]
lea eax, [ebp - 0x21c]
pop ecx
push eax
push 0
push dword [ebx + 0xc]
lea ecx, [ebp - 0x214]
push 3
pop edx
jmp 0x519ce9
lea ecx, [ebp - 0x21c]
xor edx, edx
push ecx
push eax
lea eax, [ebp - 0x20c]
inc edx
push eax
lea ecx, [ebp - 0x214]
call fcn.0051979a
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x519dd0
push ebx
push 0x200
lea eax, [ebp - 0x20c]
push 1
push eax
call dword [sym.imp.MSVCR120.dll_fread]
add esp, 0x10
test eax, eax
jne 0x519d5f
jmp 0x519dd0
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x519dc4
mov ebx, dword [ebp - 0x220]
push dword [ebx + 0xc]
push str.couldnt_open_file___s_
push eax
call fcn.00500d35
add esp, 0xc
mov eax, dword [ebp - 0x228]
push 0x1a
pop esi
and dword [eax], 0
mov eax, dword [ebp - 0x220]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x220], eax
test eax, eax
je 0x519e29
test esi, esi
je 0x519b69
mov edi, dword [ebp - 0x210]
lea ecx, [ebp - 0x234]
call fcn.005198f1
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x519e0e
push eax
call dword [0x5b6c48]
pop ecx
push edi
call dword [0x5b6c48]
mov eax, esi
pop ecx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x519deb
mov ebx, dword [ebp - 0x224]
cmp dword [edi + 0x24], esi
je 0x519e5a
push ebx
push str._r_n___s__
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x519deb
mov edi, dword [edi]
test edi, edi
jne 0x519a46
test esi, esi
jne 0x519deb
mov edi, dword [ebp - 0x210]
lea eax, [ebp - 0x21c]
push edi
push str._r_n___s___r_n
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00519898
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x519df1
mov ecx, dword [ebp - 0x230]
mov eax, dword [ebp - 0x21c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x218]
mov dword [ecx + 4], eax
test ebx, ebx
je 0x519eb7
push ebx
call dword [0x5b6c48]
pop ecx
push edi
call dword [0x5b6c48]
mov eax, dword [ebp - 0x228]
pop ecx
mov ecx, dword [ebp - 0x238]
mov dword [eax], ecx
jmp 0x5199e3
push 0x1b
pop esi
jmp 0x519e64
push 0x1b
pop esi
jmp 0x519deb