Function at 0x10040800
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x228
mov eax, dword [0x10071290]
xor eax, esp
mov dword [esp + 0x224], eax
mov eax, dword [esp + 0x230]
mov ecx, dword [esp + 0x23c]
push ebx
mov ebx, dword [esp + 0x238]
push ebp
mov ebp, dword [esp + 0x234]
push esi
mov esi, dword [esp + 0x244]
push edi
xor edi, edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [eax], edi
cmp ebx, edi
je 0x10040d2b
push ebp
call fcn.10011770
add esp, 4
push eax
push ebp
call fcn.10011770
add esp, 4
push eax
push str._________________________08x_08x
call fcn.1001fb60
add esp, 0xc
mov dword [esp + 0x20], eax
test eax, eax
jne 0x10040894
lea eax, [edi + 0x1b]
jmp 0x10040d2d
test esi, esi
jne 0x1004089d
mov esi, str.Content_Type:_multipart_form_data
push eax
push esi
push str._s__boundary_s_r_n
push 0
lea esi, [esp + 0x20]
call fcn.10040470
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100408cd
mov edx, dword [esp + 0x20]
push edx
call dword [0x100711f4]
add esp, 4
mov eax, esi
jmp 0x10040d2d
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], eax
or edi, dword [esp + 0x18]
je 0x100408fb
lea ecx, [esp + 0x14]
push 0x1006202c
push ecx
lea esi, [esp + 0x18]
call fcn.10040470
mov esi, eax
add esp, 8
test esi, esi
jne 0x10040cd0
mov edx, dword [esp + 0x20]
push edx
lea eax, [esp + 0x18]
push str.___s_r_n
push eax
lea esi, [esp + 0x1c]
call fcn.10040470
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10040cd0
lea ecx, [esp + 0x14]
push str.Content_Disposition:_form_data__name_
push ecx
lea esi, [esp + 0x18]
call fcn.10040470
mov esi, eax
add esp, 8
test esi, esi
jne 0x10040cd0
mov eax, dword [ebx + 8]
lea edx, [esp + 0x14]
push edx
cdq
push edx
push eax
mov eax, dword [ebx + 4]
push eax
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.100402d0
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x10040cd0
lea edx, [esp + 0x14]
push 0x1006a834
push edx
lea esi, [esp + 0x18]
call fcn.10040470
mov esi, eax
add esp, 8
test esi, esi
jne 0x10040cd0
cmp dword [ebx + 0x24], eax
je 0x100409e5
mov eax, dword [esp + 0x1c]
push eax
call dword [0x100711f4]
push ebp
call fcn.10011770
add esp, 8
push eax
push ebp
call fcn.10011770
add esp, 4
push eax
push str._________________________08x_08x
call fcn.1001fb60
add esp, 0xc
mov dword [esp + 0x1c], eax
test eax, eax
je 0x10040ca4
push eax
lea ecx, [esp + 0x18]
push str._r_nContent_Type:_multipart_mixed__boundary_s_r_n
push ecx
lea esi, [esp + 0x1c]
call fcn.10040470
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10040cd0
mov ebp, ebx
cmp dword [ebx + 0x24], 0
je 0x10040a20
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push str._r_n___s_r_nContent_Disposition:_attachment
push eax
lea esi, [esp + 0x1c]
call fcn.10040470
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10040cd0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x14]
push edx
mov eax, ebp
jmp 0x10040a3d
mov eax, dword [ebx + 0x28]
test al, 0x51
je 0x10040a4f
cmp dword [ebx + 0x2c], 0
jne 0x10040a31
test al, 1
je 0x10040a47
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
mov eax, ebx
call fcn.10040590
mov esi, eax
add esp, 8
test esi, esi
jne 0x10040cd0
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x10040a77
push eax
lea edx, [esp + 0x18]
push str._r_nContent_Type:__s
push edx
lea esi, [esp + 0x1c]
call fcn.10040470
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10040cd0
mov edi, dword [ebp + 0x20]
test edi, edi
je 0x10040aac
mov edi, edi
mov eax, dword [edi]
push eax
lea ecx, [esp + 0x18]
push str._r_n_s
push ecx
lea esi, [esp + 0x1c]
call fcn.10040470
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10040cd0
mov edi, dword [edi + 4]
test edi, edi
jne 0x10040a80
jmp 0x10040ab4
test esi, esi
jne 0x10040cd0
lea edx, [esp + 0x14]
push str._r_n_r_n
push edx
lea esi, [esp + 0x18]
call fcn.10040470
mov esi, eax
add esp, 8
test esi, esi
jne 0x10040cd0
mov eax, dword [ebx + 0x28]
test al, 3
jne 0x10040b6e
test al, 0x10
je 0x10040b08
mov ecx, dword [ebx + 0x14]
lea eax, [esp + 0x14]
push eax
mov eax, dword [ebx + 0x18]
cdq
push edx
push eax
push ecx
lea edx, [esp + 0x20]
push 1
push edx
call fcn.100402d0
add esp, 0x18
mov esi, eax
jmp 0x10040c56
test al, 0x40
je 0x10040b3d
test al, al
jns 0x10040b18
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
jmp 0x10040b1c
mov eax, dword [ebx + 0x10]
cdq
lea ecx, [esp + 0x14]
push ecx
push edx
mov edx, dword [ebx + 0x30]
push eax
push edx
lea eax, [esp + 0x20]
push 2
push eax
call fcn.100402d0
add esp, 0x18
mov esi, eax
jmp 0x10040c56
test al, al
jns 0x10040b49
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
jmp 0x10040b4d
mov eax, dword [ebx + 0x10]
cdq
lea ecx, [esp + 0x14]
push ecx
push edx
mov edx, dword [ebx + 0xc]
push eax
push edx
lea eax, [esp + 0x20]
push 1
push eax
call fcn.100402d0
add esp, 0x18
mov esi, eax
jmp 0x10040c56
mov ecx, dword [ebp + 0xc]
push ecx
push 0x10061524
call fcn.1003c520
add esp, 8
test eax, eax
je 0x10040b8a
call fcn.1004a13b
jmp 0x10040b9b
mov edx, dword [ebp + 0xc]
push 0x1006d564
push edx
call fcn.1004492c
add esp, 8
mov edi, eax
test edi, edi
je 0x10040c2d
call fcn.1004a13b
push edi
cmp edi, eax
je 0x10040bd7
call fcn.10044b9e
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push ecx
lea edx, [esp + 0x24]
push 3
push edx
call fcn.100402d0
add esp, 0x1c
mov esi, eax
jmp 0x10040c56
push 0x200
lea eax, [esp + 0x3c]
push 1
push eax
call fcn.10044eba
add esp, 0x10
test eax, eax
je 0x10040c56
nop
lea ecx, [esp + 0x14]
push ecx
push 0
push eax
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x20]
push 1
push eax
call fcn.100402d0
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x10040c56
push edi
push 0x200
lea ecx, [esp + 0x3c]
push 1
push ecx
call fcn.10044eba
add esp, 0x10
test eax, eax
jne 0x10040bf0
jmp 0x10040c56
mov eax, dword [esp + 0x28]
test eax, eax
je 0x10040c47
mov edx, dword [ebp + 0xc]
push edx
push str.couldnt_open_file___s_
push eax
call fcn.1001b410
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov dword [eax], 0
mov esi, 0x1a
mov ebp, dword [ebp + 0x24]
test ebp, ebp
je 0x10040c67
test esi, esi
je 0x100409e7
jmp 0x10040cd0
test esi, esi
jne 0x10040cd0
cmp dword [ebx + 0x24], esi
je 0x10040c91
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x18]
push str._r_n___s__
push edx
lea esi, [esp + 0x1c]
call fcn.10040470
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10040cd0
mov ebx, dword [ebx]
test ebx, ebx
je 0x10040cab
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x28]
jmp 0x100408d5
mov esi, 0x1b
jmp 0x10040cd0
test esi, esi
jne 0x10040cd0
mov eax, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x18]
push str._r_n___s___r_n
push ecx
lea esi, [esp + 0x1c]
call fcn.10040470
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10040cf7
lea edx, [esp + 0x24]
push edx
call fcn.100404e0
mov eax, dword [esp + 0x20]
push eax
call dword [0x100711f4]
mov ecx, dword [esp + 0x28]
push ecx
call dword [0x100711f4]
add esp, 0xc
mov eax, esi
jmp 0x10040d2d
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [eax], edx
mov edx, dword [esp + 0x1c]
push edx
mov dword [eax + 4], ecx
call dword [0x100711f4]
mov eax, dword [esp + 0x24]
push eax
call dword [0x100711f4]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
add esp, 8
mov dword [edx], ecx
xor eax, eax
mov ecx, dword [esp + 0x234]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10043fd1
add esp, 0x228
ret