Function at 0x5db990
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6c09d8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x7ca00c]
xor eax, ebp
mov dword [ebp - 0x10], 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 byte [ebp + 0xc], 0
mov ebx, dword [ebp + 8]
jne 0x5db9f5
push ecx
mov dl, 1
call fcn.005ea060
add esp, 4
test eax, eax
je 0x5db9f5
cmp eax, 2
je 0x5dbae2
push ecx
mov dl, 1
mov ecx, edi
call fcn.005dbda0
add esp, 4
test al, al
je 0x5dbae2
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x5db9ff
mov eax, dword [edi]
push 0
push 0x200080
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
jne 0x5dbae9
test ebx, ebx
je 0x5dba51
cmp dword [edi + 0x14], 8
jb 0x5dba30
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 0x701e7c
push 0x32
push ebx
jmp 0x5dbad2
cmp dword [0x7eb9f0], 0
je 0x5dba9f
cmp dword [edi + 0x14], 8
jb 0x5dba62
mov edi, dword [edi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [0x7eb9f0]
mov ecx, esi
push eax
push edi
push str.Failed_to_create_file_at_path_:_s_Error:_d
push 0x701e7c
push 0x701e7c
push str.FileUtils
push 0x7721a4
push 0x32
call dword [0x6ef350]
call esi
add esp, 0x20
xor al, al
jmp 0x5dbc82
mov esi, dword [0x7eb9f4]
test esi, esi
je 0x5dbae2
cmp dword [edi + 0x14], 8
jb 0x5dbab1
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 0x701e7c
push 0x32
push dword [0x7eb9f4]
mov esi, dword [esi + 0x34]
mov ecx, esi
call dword [0x6ef350]
call esi
add esp, 0x1c
xor al, al
jmp 0x5dbc82
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
mov dword [ebp - 4], 0
cmp dword [esi + 0x14], 8
jb 0x5dbb11
mov esi, dword [esi]
push 0
lea edx, [ebp - 0x2c]
mov ecx, esi
call fcn.005dd120
add esp, 4
mov byte [ebp - 0x2d], al
test al, al
je 0x5dbc4d
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
push ecx
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x5dbb9a
cmp dword [edi + 0x10], 0
je 0x5dbb89
cmp dword [edi + 0x14], 8
jb 0x5dbb5b
mov edi, dword [edi]
push 0
push 0xa0000080
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x5dbb89
push esi
call dword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp - 0x34]
mov bl, byte [ebp - 0x2d]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x5dbc50
test ebx, ebx
je 0x5dbbbb
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 0x701e7c
push 0x32
push ebx
jmp 0x5dbc30
cmp dword [0x7eb9f0], 0
je 0x5dbc06
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [0x7eb9f0]
mov ecx, esi
push eax
push str.Failed_to_write_in_file_ERROR_VAL:_d_n
push 0x701e7c
push 0x701e7c
push str.FileUtils
push 0x7721a4
push 0x32
call dword [0x6ef350]
call esi
add esp, 0x1c
xor bl, bl
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x5dbc50
mov esi, dword [0x7eb9f4]
test esi, esi
je 0x5dbc40
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 0x701e7c
push 0x32
push dword [0x7eb9f4]
mov esi, dword [esi + 0x34]
mov ecx, esi
call dword [0x6ef350]
call esi
add esp, 0x18
push dword [ebp - 0x34]
xor bl, bl
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x5dbc50
mov bl, byte [ebp - 0x2d]
mov edx, dword [ebp - 0x18]
cmp edx, 0x10
jb 0x5dbc80
mov ecx, dword [ebp - 0x2c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5dbc76
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5dbc9e
push edx
push ecx
call fcn.0063e103
add esp, 8
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 - 0x10]
xor ecx, ebp
call fcn.0063de71
mov esp, ebp
pop ebp
ret
call fcn.006534c5
int3