Function at 0x10067020
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100deb16
mov eax, dword fs:[0]
push eax
sub esp, 0x100
mov eax, dword [0x1010e07c]
xor eax, esp
mov dword [esp + 0xf8], eax
push ebx
push esi
push edi
mov eax, dword [0x1010e07c]
xor eax, esp
push eax
lea eax, [esp + 0x110]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov al, byte [ebp + 0x14]
xor ebx, ebx
mov byte [esp + 0x13], al
cmp dword [esi + 0x10], ebx
je 0x10067267
cmp dword [esi + 0x14], 8
jb 0x10067086
mov edi, dword [esi]
jmp 0x10067088
mov edi, esi
xor ecx, ecx
cmp al, bl
setne cl
push ebx
push 0x80
lea ecx, [ecx + ecx + 2]
push ecx
push ebx
push ebx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1006726e
push 1
push 2
lea ecx, [esp + 0x24]
call fcn.100042d0
mov dword [esp + 0x118], ebx
push esi
push ecx
push str.._file:
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
lea edx, [esp + 0x34]
push str.return_false1._GetLastError:
push edx
call fcn.10007530
add esp, 0xc
mov ecx, eax
call fcn.1005be10
add esp, 4
push eax
call fcn.10007530
add esp, 0xc
push eax
call fcn.1000f0c0
add esp, 8
push 0x18
mov esi, 0xf
push str.CFileUtility::SetFileBuf
lea ecx, [esp + 0xd8]
mov dword [esp + 0xec], esi
mov dword [esp + 0xe8], ebx
mov byte [esp + 0xd8], bl
call fcn.100065d0
mov byte [esp + 0x118], 1
push esi
push str.FileUtility.cpp
lea ecx, [esp + 0xbc]
mov dword [esp + 0xd0], esi
mov dword [esp + 0xcc], ebx
mov byte [esp + 0xbc], bl
call fcn.100065d0
mov byte [esp + 0x118], 2
lea eax, [esp + 0xec]
push eax
lea ecx, [esp + 0x20]
call fcn.100043f0
mov byte [esp + 0x118], 3
push eax
lea ecx, [esp + 0xd4]
push ecx
push 0x125
lea edx, [esp + 0xc0]
push edx
push ebx
call fcn.10004af0
mov ecx, eax
call fcn.10058f40
mov byte [esp + 0x118], 2
cmp dword [esp + 0x100], 8
jb 0x100671c7
mov eax, dword [esp + 0xec]
push eax
call fcn.100b2678
add esp, 4
xor ecx, ecx
mov dword [esp + 0x100], 7
mov dword [esp + 0xfc], ebx
mov word [esp + 0xec], cx
mov byte [esp + 0x118], 1
mov edi, 0x10
cmp dword [esp + 0xc8], edi
jb 0x10067209
mov edx, dword [esp + 0xb4]
push edx
call fcn.100b2678
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
mov byte [esp + 0x118], bl
cmp dword [esp + 0xe4], edi
jb 0x1006723e
mov eax, dword [esp + 0xd0]
push eax
call fcn.100b2678
add esp, 4
mov dword [esp + 0xe4], esi
mov dword [esp + 0xe0], ebx
mov byte [esp + 0xd0], bl
mov dword [esp + 0x118], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.100029c0
xor al, al
jmp 0x1006746b
cmp byte [esp + 0x13], bl
je 0x1006727f
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp + 0x10]
mov eax, dword [esp + 0x18]
push ebx
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push edi
mov byte [esp + 0x27], 1
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1006745e
push 1
push 2
lea ecx, [esp + 0x24]
call fcn.100042d0
mov dword [esp + 0x118], 4
push esi
push ecx
push str.._file:
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
lea ecx, [esp + 0x34]
push str.return_false2._GetLastError:
push ecx
call fcn.10007530
add esp, 0xc
mov ecx, eax
call fcn.1005be10
add esp, 4
push eax
call fcn.10007530
add esp, 0xc
push eax
call fcn.1000f0c0
add esp, 8
push 0x18
mov esi, 0xf
push str.CFileUtility::SetFileBuf
lea ecx, [esp + 0xbc]
mov dword [esp + 0xd0], esi
mov dword [esp + 0xcc], ebx
mov byte [esp + 0xbc], bl
call fcn.100065d0
mov byte [esp + 0x118], 5
push esi
push str.FileUtility.cpp
lea ecx, [esp + 0xd8]
mov dword [esp + 0xec], esi
mov dword [esp + 0xe8], ebx
mov byte [esp + 0xd8], bl
call fcn.100065d0
mov byte [esp + 0x118], 6
lea edx, [esp + 0xec]
push edx
lea ecx, [esp + 0x20]
call fcn.100043f0
mov byte [esp + 0x118], 7
push eax
lea eax, [esp + 0xb8]
push eax
push 0x132
lea ecx, [esp + 0xdc]
push ecx
push ebx
call fcn.10004af0
mov ecx, eax
call fcn.10058f40
mov byte [esp + 0x118], 6
cmp dword [esp + 0x100], 8
jb 0x100673be
mov edx, dword [esp + 0xec]
push edx
call fcn.100b2678
add esp, 4
xor eax, eax
mov dword [esp + 0x100], 7
mov dword [esp + 0xfc], ebx
mov word [esp + 0xec], ax
mov byte [esp + 0x118], 5
cmp dword [esp + 0xe4], 0x10
jb 0x100673fc
mov ecx, dword [esp + 0xd0]
push ecx
call fcn.100b2678
add esp, 4
mov dword [esp + 0xe4], esi
mov dword [esp + 0xe0], ebx
mov byte [esp + 0xd0], bl
mov byte [esp + 0x118], 4
cmp dword [esp + 0xc8], 0x10
jb 0x10067433
mov edx, dword [esp + 0xb4]
push edx
call fcn.100b2678
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
mov dword [esp + 0x118], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.100029c0
jmp 0x10067462
mov bl, byte [esp + 0x13]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
mov ecx, dword [esp + 0x110]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xf8]
xor ecx, esp
call fcn.100b2b2c
mov esp, ebp
pop ebp
ret