Function at 0x40c59d
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1b4]
sub esp, 0x234
mov eax, dword [0x441040]
xor eax, ebp
mov dword [ebp + 0x1b0], eax
mov eax, dword [ebp + 0x1bc]
mov ecx, dword [ebp + 0x1cc]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 0x1c8]
push edi
mov edi, dword [ebp + 0x1c4]
cmp edi, ebx
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp + 0x1c0]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x70], ebx
mov dword [eax], ebx
je 0x40c9c8
call fcn.0040c552
cmp eax, ebx
mov dword [ebp - 0x74], eax
jne 0x40c611
push 0x1b
pop eax
jmp 0x40c9ca
cmp esi, ebx
jne 0x40c61a
mov esi, str.Content_Type:_multipart_form_data
push eax
push esi
push str._s__boundary_s_r_n
xor ebx, ebx
lea esi, [ebp - 0x54]
call fcn.0040c284
add esp, 0xc
test eax, eax
je 0x40c645
mov esi, eax
push dword [ebp - 0x74]
call dword [0x441004]
pop ecx
mov eax, esi
jmp 0x40c9ca
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x60]
or eax, dword [ebp - 0x5c]
je 0x40c66e
push 0x436814
lea ebx, [ebp - 0x60]
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
jne 0x40c97a
push dword [ebp - 0x74]
lea ebx, [ebp - 0x60]
push str.___s_r_n
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x40c97a
push str.Content_Disposition:_form_data__name_
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
jne 0x40c97a
push dword [edi + 4]
push eax
lea eax, [ebp - 0x54]
push eax
mov eax, dword [edi + 8]
call fcn.0040c1b5
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40c97a
push 0x4367e0
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
jne 0x40c97a
cmp dword [edi + 0x24], eax
je 0x40c701
call fcn.0040c552
push eax
push str._r_nContent_Type:_multipart_mixed__boundary_s_r_n
lea esi, [ebp - 0x54]
mov dword [ebp - 0x70], eax
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x40c97a
mov ebx, edi
mov dword [ebp - 0x64], ebx
xor eax, eax
cmp dword [edi + 0x24], eax
je 0x40c750
xor edi, edi
cmp dword [ebx + 0x2c], eax
jne 0x40c727
push dword [ebx + 0xc]
call fcn.0040c3b5
mov edi, eax
test edi, edi
pop ecx
je 0x40c968
mov ebx, dword [ebx + 0x2c]
test ebx, ebx
jne 0x40c730
mov ebx, edi
push ebx
push dword [ebp - 0x70]
lea ebx, [ebp - 0x60]
push str._r_n___s_r_nContent_Disposition:_attachment__filename__s_
lea esi, [ebp - 0x54]
call fcn.0040c284
add esp, 0xc
test edi, edi
mov esi, eax
je 0x40c795
push edi
jmp 0x40c78e
test byte [edi + 0x28], 0x51
je 0x40c7a0
cmp dword [edi + 0x2c], eax
jne 0x40c764
push dword [edi + 0xc]
call fcn.0040c3b5
pop ecx
mov edi, dword [edi + 0x2c]
test edi, edi
mov dword [ebp - 0x58], eax
jne 0x40c770
mov edi, eax
push edi
push str.__filename__s_
lea ebx, [ebp - 0x60]
lea esi, [ebp - 0x54]
call fcn.0040c284
cmp dword [ebp - 0x58], 0
pop ecx
pop ecx
mov esi, eax
je 0x40c795
push dword [ebp - 0x58]
call dword [0x441004]
pop ecx
test esi, esi
jne 0x40c97a
mov ebx, dword [ebp - 0x64]
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x40c7c7
push eax
push str._r_nContent_Type:__s
lea ebx, [ebp - 0x60]
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x40c97a
mov ebx, dword [ebp - 0x64]
mov edi, dword [ebx + 0x20]
jmp 0x40c7ed
push dword [edi]
lea ebx, [ebp - 0x60]
push str._r_n_s
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x40c97a
mov edi, dword [edi + 4]
test edi, edi
jne 0x40c7cc
test esi, esi
jne 0x40c97a
push str._r_n_r_n
lea ebx, [ebp - 0x60]
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
jne 0x40c97a
mov edi, dword [ebp - 0x6c]
mov eax, dword [edi + 0x28]
test al, 3
jne 0x40c856
test al, 0x10
je 0x40c830
push dword [edi + 0x14]
lea eax, [ebp - 0x54]
push 1
push eax
mov eax, dword [edi + 0x18]
jmp 0x40c847
test al, 0x40
lea eax, [ebp - 0x54]
je 0x40c83e
push dword [edi + 0x30]
push 2
jmp 0x40c843
push dword [edi + 0xc]
push 1
push eax
mov eax, dword [edi + 0x10]
call fcn.0040c1b5
add esp, 0xc
mov esi, eax
jmp 0x40c911
mov ebx, dword [ebp - 0x64]
push dword [ebx + 0xc]
push 0x4366e8
call fcn.00419af0
test eax, eax
pop ecx
pop ecx
je 0x40c874
call dword [sym.imp.MSVCR80.dll___iob_func]
jmp 0x40c884
push 0x4366ec
push dword [ebx + 0xc]
call dword [sym.imp.MSVCR80.dll_fopen]
pop ecx
pop ecx
test eax, eax
mov dword [ebp - 0x58], eax
je 0x40c8ef
call dword [sym.imp.MSVCR80.dll___iob_func]
cmp dword [ebp - 0x58], eax
push dword [ebp - 0x58]
je 0x40c8d5
call dword [sym.imp.MSVCR80.dll_fclose]
push dword [ebx + 0xc]
lea eax, [ebp - 0x54]
push 3
push eax
lea ebx, [ebp - 0x60]
xor eax, eax
call fcn.0040c1b5
add esp, 0x10
jmp 0x40c84f
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x54]
push 1
push ecx
lea ebx, [ebp - 0x60]
call fcn.0040c1b5
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40c911
push dword [ebp - 0x58]
push 0x200
lea eax, [ebp - 0x50]
push 1
push eax
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x10
test eax, eax
jne 0x40c8b7
jmp 0x40c911
cmp dword [ebp - 0x7c], 0
je 0x40c908
push dword [ebx + 0xc]
push str.couldnt_open_file___s__n
push dword [ebp - 0x7c]
call fcn.004144d7
add esp, 0xc
mov eax, dword [ebp - 0x78]
and dword [eax], 0
push 0x1a
pop esi
mov eax, dword [ebp - 0x64]
mov eax, dword [eax + 0x24]
test eax, eax
mov dword [ebp - 0x64], eax
je 0x40c92c
test esi, esi
jne 0x40c97a
mov edi, dword [ebp - 0x6c]
mov ebx, eax
jmp 0x40c706
test esi, esi
jne 0x40c97a
cmp dword [edi + 0x24], esi
je 0x40c95a
push dword [ebp - 0x70]
lea ebx, [ebp - 0x60]
push str._r_n___s__
lea esi, [ebp - 0x54]
call fcn.0040c284
push dword [ebp - 0x70]
mov esi, eax
call dword [0x441004]
add esp, 0xc
test esi, esi
jne 0x40c97a
mov edi, dword [edi]
test edi, edi
mov dword [ebp - 0x6c], edi
je 0x40c989
jmp 0x40c64b
lea eax, [ebp - 0x68]
push eax
call fcn.0040c2d3
pop ecx
push 0x1b
pop esi
jmp 0x40c634
lea eax, [ebp - 0x68]
push eax
call fcn.0040c2d3
pop ecx
jmp 0x40c634
test esi, esi
jne 0x40c97a
push dword [ebp - 0x74]
lea ebx, [ebp - 0x60]
push str._r_n___s___r_n
lea esi, [ebp - 0x54]
call fcn.0040c284
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x40c97a
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x60]
push dword [ebp - 0x74]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x5c]
mov dword [eax + 4], ecx
call dword [0x441004]
mov eax, dword [ebp - 0x68]
pop ecx
mov ecx, dword [ebp - 0x78]
mov dword [ecx], eax
xor eax, eax
mov ecx, dword [ebp + 0x1b0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042b108
add ebp, 0x1b4
leave
ret