Function at 0x1005a248
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008ae52
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2348
call fcn.10062090
mov eax, dword [0x1009a008]
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 dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
xor ebx, ebx
push 0x22da
mov dword [ebp - 0x22fc], eax
lea eax, [ebp - 0x22ef]
mov esi, ecx
push ebx
push eax
mov dword [ebp - 0x22f4], esi
mov byte [ebp - 0x22f0], bl
call fcn.100620c0
add esp, 0xc
push 0xa
pop ecx
xor eax, eax
mov dword [ebp - 0x2358], ebx
lea edi, [ebp - 0x2354]
rep stosd dword es:[edi], eax
lea eax, [esi + 0x11fa4]
push eax
lea ecx, [ebp - 0x232c]
mov dword [ebp - 0x2300], ebx
call fcn.10037ac7
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.1004074d
lea eax, [esi + 0xc]
push 0x100018c8
push eax
mov byte [esi + 0x11c76], bl
call fcn.100621e0
pop ecx
pop ecx
test eax, eax
je 0x1005a314
lea eax, [esi + 0x100c]
push 0x1000a204
push eax
call fcn.100621e0
pop ecx
pop ecx
test eax, eax
jne 0x1005a31b
mov ecx, esi
call fcn.10045316
lea eax, [ebp - 0x22f0]
push eax
mov ecx, esi
call fcn.1004c75a
mov al, byte [ebp + 8]
cmp al, byte [ebp - 0x22e6]
jbe 0x1005a389
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x22f4], eax
mov byte [ebp - 4], 1
cmp eax, ebx
je 0x1005a36d
movzx ecx, byte [ebp - 0x22e6]
push ecx
movzx ecx, byte [ebp + 8]
push ecx
push 0x1000a1b0
push ebx
push 2
push eax
call fcn.10037a50
add esp, 0x18
jmp 0x1005a36f
xor eax, eax
mov dword [ebp - 0x2314], eax
mov byte [ebp - 4], bl
push 0x1008bdb8
lea eax, [ebp - 0x2314]
push eax
call fcn.1006330f
movzx edi, al
imul edi, edi, 0x22
lea eax, [ebp + edi - 0x22ec]
mov dword [ebp - 0x2304], eax
cmp dword [eax], ebx
jne 0x1005a3ec
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x22f4], eax
mov byte [ebp - 4], 2
cmp eax, ebx
je 0x1005a3d4
mov ecx, dword [ebp - 0x2304]
push dword [ecx]
push 0x1000a168
push ebx
push 0xa
push eax
call fcn.10037a50
add esp, 0x14
jmp 0x1005a3d6
xor eax, eax
mov dword [ebp - 0x2318], eax
mov byte [ebp - 4], bl
push 0x1008bdb8
lea eax, [ebp - 0x2318]
jmp 0x1005a383
push ebx
push ebx
push 2
push ebx
push 1
push 0x40000000
push dword [ebp - 0x22fc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x22f8], eax
cmp eax, 0xffffffff
jne 0x1005a465
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x22f4], eax
mov byte [ebp - 4], 3
cmp eax, ebx
je 0x1005a44a
push esi
push dword [ebp - 0x22fc]
push 0x1000a118
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x18
jmp 0x1005a44c
xor eax, eax
mov dword [ebp - 0x2308], eax
mov byte [ebp - 4], bl
push 0x1008bdb8
lea eax, [ebp - 0x2308]
jmp 0x1005a383
cmp byte [ebp + edi - 0x22f0], 1
mov byte [ebp - 4], 4
jne 0x1005a580
mov esi, dword [ebp + edi - 0x22fc]
sub esi, dword [ebp + edi - 0x2303]
mov eax, dword [ebp - 0x2304]
push 0x2c
pop edi
inc esi
imul esi, dword [eax]
push edi
lea eax, [ebp - 0x2358]
push ebx
push eax
call fcn.100620c0
mov ecx, dword [ebp - 0x22f4]
add esp, 0xc
push esi
lea eax, [ebp - 0x2358]
push eax
call fcn.10047582
push ebx
lea eax, [ebp - 0x2300]
push eax
push edi
lea eax, [ebp - 0x2358]
push eax
push dword [ebp - 0x22f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1005a525
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x22f4], eax
mov byte [ebp - 4], 5
cmp eax, ebx
je 0x1005a50b
push esi
push 0x1000a0b8
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x14
mov ebx, eax
mov byte [ebp - 4], 4
mov dword [ebp - 0x231c], ebx
push 0x1008bdb8
lea eax, [ebp - 0x231c]
jmp 0x1005a383
cmp dword [ebp - 0x2300], edi
je 0x1005a57a
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x22f4], eax
mov byte [ebp - 4], 6
cmp eax, ebx
je 0x1005a560
push edi
push dword [ebp - 0x2300]
push 0x1000a048
push ebx
push 0xa
push eax
call fcn.10037a50
add esp, 0x18
mov ebx, eax
mov byte [ebp - 4], 4
mov dword [ebp - 0x2310], ebx
push 0x1008bdb8
lea eax, [ebp - 0x2310]
jmp 0x1005a383
mov esi, dword [ebp - 0x22f4]
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [ebp + 0x18]
lea eax, [ebp - 0x22f0]
push dword [ebp + 0x14]
mov ecx, esi
push ebx
push ebx
push dword [ebp + 0x10]
push ebx
push dword [ebp + 0x1c]
push dword [ebp - 0x22f8]
push eax
push dword [ebp + 8]
call fcn.10059387
push dword [ebp - 0x22f8]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x22f8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x232c]
call fcn.10037af5
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.10062074
leave
ret 0x18