Function at 0x402589
Capabilities:
Read file on windows

Disassembly:
push ebp
push esp
pop ebp
push edi
push esi
push ebx
sub esp, 0x22c
sub esi, esi
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x14], 0
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [eax], 0
test edi, edi
je 0x402a4c
mov eax, dword [ebp + 8]
mov si, 0x1b
call fcn.00402244
mov dword [ebp - 0x228], eax
or eax, eax
je 0x402a4c
test ebx, ebx
jne 0x4025e6
mov ebx, str.Content_Type:_multipart_form_data
sub esp, 0xc
push dword [ebp - 0x228]
push ebx
lea ebx, [ebp - 0x14]
push str._s__boundary_s_r_n
push 0
push ebx
call fcn.00402410
add esp, 0x20
push eax
pop esi
or eax, eax
jne 0x4029e5
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
or eax, dword [ebp - 0x1c]
je 0x402645
lea eax, [ebp - 0x14]
push edx
lea edx, [ebp - 0x20]
push 0x41f22f
push edx
push eax
call fcn.00402410
add esp, 0x10
push eax
pop esi
or eax, eax
jne 0x4029bb
push dword [ebp - 0x228]
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x14]
push str.___s_r_n
push edx
push eax
call fcn.00402410
add esp, 0x10
mov esi, eax
or eax, eax
jne 0x4029bb
lea edx, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push str.Content_Disposition:_form_data__name_
push edx
push eax
call fcn.00402410
add esp, 0x10
push eax
pop esi
test eax, eax
jne 0x4029bb
lea edx, [ebp - 0x20]
push eax
push eax
lea eax, [ebp - 0x14]
mov ecx, dword [edi + 4]
push edx
push dword [edi + 8]
xor edx, edx
call fcn.004022f2
add esp, 0x10
push eax
pop esi
or eax, eax
jne 0x4029bb
lea edx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push 0x41f260
push eax
push edx
call fcn.00402410
add esp, 0x10
test eax, eax
jne 0x402a45
cmp dword [edi + 0x24], 0
je 0x402722
cmp dword [ebp - 0x224], 0
je 0x4026ec
sub esp, 0xc
push dword [ebp - 0x224]
call dword [0x41e00c]
add esp, 0x10
mov eax, dword [ebp + 8]
call fcn.00402244
mov dword [ebp - 0x224], eax
or eax, eax
je 0x402a3b
push eax
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x20]
push str._r_nContent_Type:_multipart_mixed__boundary_s_r_n
push eax
push edx
call fcn.00402410
add esp, 0x10
push eax
pop esi
test eax, eax
jne 0x4029bb
mov dword [ebp - 0x22c], edi
xor esi, esi
cmp dword [edi + 0x24], 0
je 0x402763
push dword [ebp - 0x224]
lea eax, [ebp - 0x20]
lea edx, [ebp - 0x14]
push str._r_n___s_r_nContent_Disposition:_attachment
push eax
push edx
call fcn.00402410
add esp, 0x10
push eax
pop esi
or eax, eax
jne 0x4029bb
lea ecx, [ebp - 0x20]
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0x22c]
jmp 0x40277c
mov eax, dword [edi + 0x28]
test al, 0x51
je 0x40278b
cmp dword [edi + 0x2c], 0
jne 0x402774
test al, 1
je 0x402783
lea ecx, [ebp - 0x20]
lea edx, [ebp - 0x14]
push edi
pop eax
call fcn.00402451
push eax
pop esi
test esi, esi
jne 0x4029bb
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x4027b8
push eax
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x20]
push str._r_nContent_Type:__s
push eax
push edx
call fcn.00402410
add esp, 0x10
push eax
pop esi
or eax, eax
jne 0x4029bb
mov eax, dword [ebp - 0x22c]
mov ebx, dword [eax + 0x20]
jmp 0x4027e7
push dword [ebx]
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x14]
push str._r_n_s
push edx
push eax
call fcn.00402410
add esp, 0x10
push eax
pop esi
or eax, eax
jne 0x4029bb
mov ebx, dword [ebx + 4]
or ebx, ebx
jne 0x4027c3
test esi, esi
jne 0x4029bb
lea edx, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push str._r_n_r_n
push edx
push eax
call fcn.00402410
add esp, 0x10
push eax
pop esi
test eax, eax
jne 0x4029bb
test byte [edi + 0x28], 3
je 0x4028ff
mov edx, dword [ebp - 0x22c]
push eax
push eax
push dword [edx + 0xc]
push 0x41f1e9
call sym.survivalist.exe_curl_strequal
add esp, 0x10
test eax, eax
je 0x402841
mov ebx, dword [sym.imp.msvcrt.dll__iob]
jmp 0x40285b
push eax
push eax
mov eax, dword [ebp - 0x22c]
push 0x41f1c4
push dword [eax + 0xc]
call sub.msvcrt.dll_fopen
add esp, 0x10
push eax
pop ebx
or ebx, ebx
je 0x4028cf
cmp ebx, dword [sym.imp.msvcrt.dll__iob]
je 0x4028b2
sub esp, 0xc
push ebx
call sub.msvcrt.dll_fclose
mov edx, dword [ebp - 0x22c]
pop ebx
lea eax, [ebp - 0x20]
pop esi
mov ecx, dword [edx + 0xc]
push eax
nop
push 3
nop
pop edx
push 0
jmp 0x40293c
lea edx, [ebp - 0x20]
push ecx
push ecx
lea ecx, [ebp - 0x220]
push edx
pushfd
xor edx, edx
inc edx
popfd
push eax
lea eax, [ebp - 0x14]
call fcn.004022f2
add esp, 0x10
push eax
pop esi
or eax, eax
jne 0x402949
lea eax, [ebp - 0x220]
push ebx
push 0x200
push 1
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
test eax, eax
jne 0x40288b
jmp 0x402949
cmp dword [ebp + 8], 0
je 0x4028ef
push edx
mov edx, dword [ebp - 0x22c]
push dword [edx + 0xc]
push str.couldnt_open_file___s_
push dword [ebp + 8]
call fcn.0040e249
add esp, 0x10
mov eax, dword [ebp + 0xc]
push esi
pop esi
push 0x1a
pop esi
mov dword [eax], 0
jmp 0x402949
mov eax, dword [edi + 0x28]
test al, 0x10
je 0x402914
lea edx, [ebp - 0x20]
push eax
push eax
mov ecx, dword [edi + 0x14]
push edx
push dword [edi + 0x18]
jmp 0x402937
test al, 0x40
je 0x40292b
push eax
push eax
lea eax, [ebp - 0x20]
mov ecx, dword [edi + 0x30]
push eax
nop
push 2
nop
pop edx
push dword [edi + 0x10]
jmp 0x40293c
lea edx, [ebp - 0x20]
push eax
push eax
mov ecx, dword [edi + 0xc]
push edx
push dword [edi + 0x10]
nop
push 1
nop
pop edx
lea eax, [ebp - 0x14]
call fcn.004022f2
add esp, 0x10
push eax
pop esi
mov eax, dword [ebp - 0x22c]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x402965
or esi, esi
jne 0x4029bb
jmp 0x40272a
test esi, esi
jne 0x4029bb
cmp dword [edi + 0x24], 0
je 0x402990
push dword [ebp - 0x224]
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x14]
push str._r_n___s__
push edx
push eax
call fcn.00402410
add esp, 0x10
push eax
pop esi
test eax, eax
jne 0x4029bb
mov edi, dword [edi]
test edi, edi
jne 0x40261d
push dword [ebp - 0x228]
lea eax, [ebp - 0x20]
push str._r_n___s___r_n
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00402410
add esp, 0x10
push eax
pop esi
test eax, eax
je 0x4029f6
sub esp, 0xc
lea eax, [ebp - 0x18]
push eax
call fcn.00401fc4
add esp, 0x10
cmp dword [ebp - 0x224], 0
je 0x4029e5
sub esp, 0xc
push dword [ebp - 0x224]
call dword [0x41e00c]
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0x228]
call dword [0x41e00c]
jmp 0x402a36
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [ecx + 4], edx
mov dword [ecx], eax
cmp dword [ebp - 0x224], 0
je 0x402a1f
sub esp, 0xc
push dword [ebp - 0x224]
call dword [0x41e00c]
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0x228]
call dword [0x41e00c]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x18]
mov dword [edx], eax
add esp, 0x10
jmp 0x402a4c
push 0x1b
pop esi
push eax
pop eax
jmp 0x4029bb
push eax
pop esi
jmp 0x4029bb
lea esp, [ebp - 0xc]
push esi
pop eax
pop ebx
pop esi
pop edi
pop ebp
ret