Function at 0x403cb0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x110
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x124]
xor ebp, ebp
cmp edi, ebp
je 0x403cdd
mov ebx, dword [esp + 0x128]
cmp ebx, ebp
je 0x403cdd
mov esi, dword [esp + 0x12c]
cmp esi, ebp
jne 0x403cf1
push 0x57
call fcn.00411cb0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret
push 0x104
push edi
lea eax, [esp + 0x24]
push eax
call fcn.00410330
mov dl, 0x5c
lea ecx, [esp + 0x1c]
call fcn.004101e0
cmp eax, ebp
je 0x403d60
lea ecx, [esp + 0x1c]
push ecx
mov byte [eax], 0
call fcn.00402430
add esp, 4
test eax, eax
jne 0x403d60
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
push esi
lea edx, [esp + 0x24]
push edx
push 0x7d
call fcn.004029d0
push esi
call fcn.0040e340
push eax
lea eax, [esp + 0x34]
push eax
push str.ERROR:_unable_to_create_directory__s_n_s_n_n
call fcn.0040e170
add esp, 0x20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret
push edi
mov dword [esp + 0x18], ebp
call fcn.00403ef0
add esp, 4
test eax, eax
jne 0x403da5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
push esi
push edi
push 0x7e
call fcn.004029d0
push esi
call fcn.0040e340
push eax
push edi
push str.ERROR:_unable_to_get_write_permission_on_file__s_n_s_n_n
call fcn.0040e170
add esp, 0x20
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x110
ret
cmp dword [esp + 0x134], ebp
je 0x403db9
push edi
call fcn.004034d0
add esp, 4
jmp 0x403dbb
mov eax, edi
push ebp
push ebp
push 2
push ebp
push ebp
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
cmp ecx, 0xffffffff
mov dword [esp + 0x10], ecx
jne 0x403e0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
push esi
push edi
push 0x7e
call fcn.004029d0
push esi
call fcn.0040e340
push eax
push edi
push str.ERROR:_unable_to_create_file__s_n_s_n_n
call fcn.0040e170
mov eax, dword [esp + 0x34]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
test esi, esi
jbe 0x403e5d
cmp esi, 0x40000
mov edi, esi
jb 0x403e21
mov edi, 0x40000
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403e4b
mov eax, dword [esp + 0x18]
cmp edi, eax
jne 0x403e4b
sub esi, eax
add ebx, eax
add ebp, eax
test esi, esi
ja 0x403e12
mov edi, dword [esp + 0x124]
mov esi, dword [esp + 0x12c]
mov ecx, dword [esp + 0x10]
cmp ebp, esi
je 0x403e6a
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403e8e
mov eax, dword [esp + 0x130]
test eax, eax
je 0x403e83
push eax
push eax
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x403ec5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
mov esi, eax
push esi
push edi
push 0x7f
call fcn.004029d0
push esi
call fcn.0040e340
push eax
push edi
push str.ERROR:_unable_to_write_file__s_n_s_n_n
call fcn.0040e170
mov eax, dword [esp + 0x34]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
push edi
call fcn.00401f60
add esp, 4
pop edi
pop esi
mov dword [esp + 0xc], 1
mov eax, dword [esp + 0xc]
pop ebp
pop ebx
add esp, 0x110
ret