Function at 0x403620
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 0x40364d
mov ebx, dword [esp + 0x128]
cmp ebx, ebp
je 0x40364d
mov esi, dword [esp + 0x12c]
cmp esi, ebp
jne 0x403661
push 0x57
call fcn.0040c3e0
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.0040a830
mov dl, 0x5c
lea ecx, [esp + 0x1c]
call fcn.0040a780
cmp eax, ebp
je 0x4036d0
lea ecx, [esp + 0x1c]
push ecx
mov byte [eax], 0
call fcn.00402080
add esp, 4
test eax, eax
jne 0x4036d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
push esi
lea edx, [esp + 0x24]
push edx
push 0x7d
call fcn.00402620
push esi
call fcn.00425240
push eax
lea eax, [esp + 0x34]
push eax
push str.ERROR:_unable_to_create_directory__s_n_s_n_n
call fcn.004250f0
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.00403860
add esp, 4
test eax, eax
jne 0x403715
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
push esi
push edi
push 0x7e
call fcn.00402620
push esi
call fcn.00425240
push eax
push edi
push str.ERROR:_unable_to_get_write_permission_on_file__s_n_s_n_n
call fcn.004250f0
add esp, 0x20
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x110
ret
cmp dword [esp + 0x134], ebp
je 0x403729
push edi
call fcn.00402e60
add esp, 4
jmp 0x40372b
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 0x40377e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
push esi
push edi
push 0x7e
call fcn.00402620
push esi
call fcn.00425240
push eax
push edi
push str.ERROR:_unable_to_create_file__s_n_s_n_n
call fcn.004250f0
mov eax, dword [esp + 0x34]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
test esi, esi
jbe 0x4037cd
cmp esi, 0x40000
mov edi, esi
jb 0x403791
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 0x4037bb
mov eax, dword [esp + 0x18]
cmp edi, eax
jne 0x4037bb
sub esi, eax
add ebx, eax
add ebp, eax
test esi, esi
ja 0x403782
mov edi, dword [esp + 0x124]
mov esi, dword [esp + 0x12c]
mov ecx, dword [esp + 0x10]
cmp ebp, esi
je 0x4037da
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4037fe
mov eax, dword [esp + 0x130]
test eax, eax
je 0x4037f3
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 0x403835
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
mov esi, eax
push esi
push edi
push 0x7f
call fcn.00402620
push esi
call fcn.00425240
push eax
push edi
push str.ERROR:_unable_to_write_file__s_n_s_n_n
call fcn.004250f0
mov eax, dword [esp + 0x34]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
push edi
call fcn.00401bc0
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