Function at 0x501800
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59f5c8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x60a070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
cmp dword [edi + 0x14], 8
mov ebx, dword [ebp + 8]
jb 0x50183c
mov eax, dword [edi]
jmp 0x50183e
mov eax, edi
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
jne 0x50191c
test ebx, ebx
je 0x501898
cmp dword [edi + 0x14], 8
jb 0x50186f
mov edi, dword [edi]
mov esi, dword [ebx]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push edi
push str.Failed_to_create_file_at_path_:_s_Error:_d
push str.FileUtils
push 0x5c0ec0
push 0x32
push ebx
call dword [esi + 0x34]
add esp, 0x1c
xor al, al
jmp 0x501a4f
cmp dword [0x615408], 0
je 0x5018dc
cmp dword [edi + 0x14], 8
jb 0x5018a9
mov edi, dword [edi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push edi
push str.Failed_to_create_file_at_path_:_s_Error:_d
push 0x5c0ec0
push 0x5c0ec0
push str.FileUtils
push str.OOBEUtils
push 0x32
call dword [0x615408]
add esp, 0x20
xor al, al
jmp 0x501a4f
mov esi, dword [0x61540c]
test esi, esi
je 0x501915
cmp dword [edi + 0x14], 8
jb 0x5018ee
mov edi, dword [edi]
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push edi
push str.Failed_to_create_file_at_path_:_s_Error:_d
push str.FileUtils
push 0x5c0ec0
push 0x32
push dword [0x61540c]
call dword [esi + 0x34]
add esp, 0x1c
xor al, al
jmp 0x501a4f
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x30], 0
mov dword [ebp - 4], 0
cmp dword [esi + 0x14], 8
jb 0x501944
mov esi, dword [esi]
push 0
lea edx, [ebp - 0x30]
mov ecx, esi
call fcn.00502420
add esp, 4
mov byte [ebp - 0x31], al
test al, al
je 0x501a35
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x18]
mov esi, dword [ebp - 0x38]
lea edx, [ebp - 0x30]
cmovae edx, dword [ebp - 0x30]
push 0
push eax
push dword [ebp - 0x20]
push edx
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x501997
mov ecx, edi
call fcn.0047b3c0
mov bl, byte [ebp - 0x31]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x501a38
test ebx, ebx
je 0x5019b8
mov esi, dword [ebx]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Failed_to_write_in_file_ERROR_VAL:_d_n
push str.FileUtils
push 0x5c0ec0
push 0x32
push ebx
jmp 0x501a21
cmp dword [0x615408], 0
je 0x5019f7
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Failed_to_write_in_file_ERROR_VAL:_d_n
push 0x5c0ec0
push 0x5c0ec0
push str.FileUtils
push str.OOBEUtils
push 0x32
call dword [0x615408]
add esp, 0x1c
xor bl, bl
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x501a38
mov esi, dword [0x61540c]
test esi, esi
je 0x501a27
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Failed_to_write_in_file_ERROR_VAL:_d_n
push str.FileUtils
push 0x5c0ec0
push 0x32
push dword [0x61540c]
call dword [esi + 0x34]
add esp, 0x18
mov esi, dword [ebp - 0x38]
xor bl, bl
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x501a38
mov bl, byte [ebp - 0x31]
mov eax, dword [ebp - 0x1c]
cmp eax, 0x10
jb 0x501a4d
inc eax
lea ecx, [ebp - 0x30]
push eax
push dword [ebp - 0x30]
call fcn.00408330
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0055eeb4
mov esp, ebp
pop ebp
ret