Function at 0x1003eb5
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x10090b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x10c
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x148]
push 0
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0x134], 0
xor eax, eax
inc eax
add esp, 0xc
mov dword [ebp - 0x38], eax
cmp dword [ebp + 0x20], eax
jbe 0x1003f4f
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x1c]
sub edx, ecx
mov dword [ebp - 0x34], edx
lea edx, [ebp - 0xf0]
lea esi, [ebp - 0xe8]
sub edx, ecx
sub esi, ecx
lea eax, [ecx + 4]
sub edi, ecx
cmp dword [ebp - 0x38], 2
ja 0x1003f4f
cmp dword [edi + eax], 0
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + eax]
mov dword [edx + eax], ecx
mov ecx, dword [eax]
mov dword [esi + eax], ecx
je 0x1003f41
inc dword [ebp - 0x134]
inc dword [ebp - 0x38]
mov ecx, dword [ebp + 0x20]
add eax, 4
cmp dword [ebp - 0x38], ecx
jb 0x1003f21
lea eax, [ebp - 0x148]
push eax
push ebx
call fcn.01003c53
mov edi, eax
test edi, edi
jl 0x1004412
cmp byte [ebp + 0x28], 0
mov esi, dword [sym.imp.msvcrt.dll_printf]
je 0x1003fea
push 0x1001d8c
call esi
push dword [ebp - 0x148]
push 0x1001d78
call esi
push dword [ebp - 0x144]
push 0x1001d60
call esi
push dword [ebp - 0x140]
push 0x1001d4c
call esi
push 0x1001d34
call esi
push dword [ebp - 0x13c]
push 0x1001d20
call esi
push dword [ebp - 0x138]
push 0x1001d0c
call esi
push dword [ebp - 0x130]
push 0x1001cf8
call esi
push dword [ebp - 0x12c]
push 0x1001ce4
call esi
add esp, 0x40
push dword [ebp - 0x44]
push 0x1001ccc
call esi
pop ecx
pop ecx
mov eax, dword [ebx]
test eax, eax
je 0x1004008
push 0
push dword [ebx + 4]
push eax
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x1004008
mov edi, 0x80004005
and dword [ebx + 0x10], 0
mov byte [ebx + 8], 0
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
push ebx
call fcn.0100733c
mov edi, eax
test edi, edi
jl 0x1004412
mov bl, byte [ebp + 0x28]
test bl, bl
je 0x1004064
push 0x1001cb8
call esi
push dword [ebp - 0x130]
push 0x1001cf8
call esi
push dword [ebp - 0x12c]
push 0x1001ce4
call esi
push dword [ebp - 0x44]
push 0x1001ccc
call esi
add esp, 0x1c
lea eax, [ebp - 0x148]
push eax
call fcn.0100605f
mov edi, eax
test edi, edi
jl 0x1004412
push dword [ebp + 0x10]
lea eax, [ebp - 0x148]
push eax
call fcn.01006a66
mov edi, eax
test bl, bl
je 0x10040f9
test edi, edi
jl 0x1004412
push dword [ebp - 0xf4]
push 0x1001c9c
call esi
push 0x1001c7c
call esi
push dword [ebp - 0x130]
push 0x1001cf8
call esi
push dword [ebp - 0x12c]
push 0x1001ce4
call esi
push dword [ebp - 0x128]
push 0x1001c64
call esi
push dword [ebp - 0x124]
push 0x1001c48
call esi
push dword [ebp - 0x120]
push 0x1001c30
call esi
push dword [ebp - 0x44]
push 0x1001ccc
call esi
add esp, 0x3c
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.0100591e
mov edi, eax
test bl, bl
je 0x1004138
test edi, edi
jl 0x1004412
push dword [ebp - 0xfc]
push 0x1001c08
call esi
push dword [ebp - 0x100]
push 0x1001be0
call esi
add esp, 0x10
test edi, edi
jl 0x1004412
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
je 0x1004156
lea eax, [ebp - 0x148]
push eax
call fcn.010049c3
mov edi, eax
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.01006364
mov edi, eax
test bl, bl
je 0x1004187
test edi, edi
jl 0x1004412
push dword [ebp - 0x114]
push 0x1001bc0
call esi
pop ecx
pop ecx
test edi, edi
jl 0x1004412
push 3
lea eax, [ebp - 0x148]
push eax
call fcn.01005f66
mov edi, eax
test bl, bl
je 0x10041ba
test edi, edi
jl 0x1004412
push dword [ebp - 0xf8]
push 0x1001b90
call esi
pop ecx
pop ecx
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.0100381a
mov edi, eax
test bl, bl
je 0x10041eb
test edi, edi
jl 0x1004412
push dword [ebp - 0x104]
push 0x1001b6c
call esi
pop ecx
pop ecx
test edi, edi
jl 0x1004412
push 0x30
push dword [ebp - 0x130]
call fcn.01007ab6
mov dword [ebp - 0xdc], eax
test eax, eax
jne 0x100420f
mov edi, 0x8007000e
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.01005d7c
mov edi, eax
test bl, bl
je 0x1004290
test edi, edi
jl 0x1004412
push 0x1001b40
call esi
xor eax, eax
cmp dword [ebp - 0xb0], eax
pop ecx
jle 0x1004264
mov ecx, dword [ebp - 0xa0]
push dword [ecx + eax*4]
lea ebx, [eax + 1]
push ebx
push 0x1001b30
call esi
mov eax, ebx
add esp, 0xc
cmp eax, dword [ebp - 0xb0]
jl 0x1004243
push dword [ebp - 0x9c]
push 0x1001b18
call esi
push dword [ebp - 0xb4]
mov eax, dword [ebp - 0xfc]
mov ecx, dword [ebp - 0xf4]
add eax, ecx
push eax
push 0x1001aec
call esi
add esp, 0x14
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.0100600d
mov edi, eax
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.01004a12
mov edi, eax
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.010046ac
cmp byte [ebp + 0x28], 0
mov edi, eax
je 0x1004327
test edi, edi
jl 0x1004412
push 0x1001acc
call esi
xor eax, eax
cmp dword [ebp - 0x68], eax
pop ecx
jle 0x100430a
mov ecx, dword [ebp - 0x58]
push dword [ecx + eax*4]
lea ebx, [eax + 1]
push ebx
push 0x1001b30
call esi
mov eax, ebx
add esp, 0xc
cmp eax, dword [ebp - 0x68]
jl 0x10042ef
push dword [ebp - 0x54]
push 0x1001abc
call esi
push dword [ebp - 0x6c]
push dword [ebp - 0x10c]
push 0x1001a98
call esi
add esp, 0x14
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.01005748
cmp byte [ebp + 0x28], 0
mov edi, eax
je 0x100439c
test edi, edi
jl 0x1004412
push dword [ebp - 0xbc]
push 0x1001a78
call esi
push 0x1001a4c
call esi
xor eax, eax
add esp, 0xc
cmp dword [ebp - 0xd0], eax
jle 0x100438d
mov ecx, dword [ebp - 0xc0]
push dword [ecx + eax*4]
lea ebx, [eax + 1]
push ebx
push 0x1001b30
call esi
mov eax, ebx
add esp, 0xc
cmp eax, dword [ebp - 0xd0]
jl 0x100436c
push dword [ebp - 0xd4]
push 0x1001a34
call esi
pop ecx
pop ecx
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.010054cf
cmp byte [ebp + 0x28], 0
mov edi, eax
je 0x10043c7
test edi, edi
jl 0x1004412
push dword [ebp - 0xd8]
push 0x1001a04
call esi
pop ecx
pop ecx
test edi, edi
jl 0x1004412
lea eax, [ebp - 0x148]
push eax
call fcn.01004b1c
cmp byte [ebp + 0x28], 0
mov edi, eax
je 0x1004412
test edi, edi
jl 0x1004412
mov ebx, dword [ebp - 0x40]
push 0x10019f0
call esi
push dword [ebx + 0x28]
push 0x10019d8
call esi
push dword [ebx + 0x2c]
push 0x10019c0
call esi
mov eax, dword [ebx + 0x28]
add eax, dword [ebx + 0x2c]
push eax
push 0x10019a8
call esi
add esp, 0x1c
cmp byte [ebp + 0x24], 0
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x1004465
xor ebx, ebx
cmp edi, ebx
jl 0x1004483
push 0x2b
lea eax, [ebp - 0x2f]
push ebx
push eax
mov byte [ebp - 0x30], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push ebx
lea eax, [ebp - 0x34]
push eax
push 4
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x3c]
mov edi, 0x80004005
call esi
test eax, eax
je 0x1004483
push ebx
lea eax, [ebp - 0x34]
push eax
push 0x2c
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x3c]
call esi
test eax, eax
je 0x1004483
xor edi, edi
test edi, edi
jl 0x1004483
push 0
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x40]
push dword [ebp - 0x3c]
call esi
test eax, eax
jne 0x1004483
mov edi, 0x80004005
lea eax, [ebp - 0x148]
push eax
call fcn.0100386c
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01003059
leave
ret 0x24