Function at 0x100641f
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x1020204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
push 0x26b
lea eax, [ebp - 0x2bf]
push ebx
push eax
mov dword [ebp - 0x2d0], esi
mov byte [ebp - 0x2c0], bl
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [0x1020a68], ebx
mov dword [ebp - 0x2d4], ebx
jne 0x10064b4
mov eax, dword [0x10201bc]
xor ecx, ecx
mov edx, eax
inc ecx
and edx, ecx
mov dword [0x10222d0], edx
mov edx, eax
and edx, 4
mov dword [0x10222cc], edx
mov edx, eax
and edx, 8
and eax, 2
mov dword [0x10222c4], eax
mov eax, dword [0x1021138]
mov dword [0x10222c8], edx
mov dword [0x1022088], eax
mov byte [0x10222e0], bl
mov dword [0x1020a68], ecx
cmp esi, ebx
je 0x1006a2a
cmp edi, ebx
jne 0x1006558
push dword [esi]
call fcn.01008da0
push eax
mov edi, 0x104
push edi
push 0x10221c0
mov dword [ebp - 0x2c8], eax
call fcn.0101627b
add esp, 0xc
push dword [ebp - 0x2c8]
push dword [esi]
call fcn.01008e39
push dword [esi + 4]
call fcn.01008da0
push eax
push edi
push 0x10220a0
mov dword [ebp - 0x2c8], eax
call fcn.0101627b
add esp, 0xc
push dword [ebp - 0x2c8]
push dword [esi + 4]
call fcn.01008e39
push 1
call fcn.0100db6b
push ebx
push 0x100573d
push dword [0x1021df0]
push 0x1001714
push dword [0x1021dd8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push ebx
mov edi, eax
call fcn.0100db6b
cmp edi, ebx
je 0x1006a2a
mov edi, 0x10222e0
jmp 0x1006596
mov eax, dword [ebp + 0x10]
mov ecx, eax
and ecx, 1
mov dword [0x10222d0], ecx
mov ecx, eax
and ecx, 2
push ebx
mov dword [0x10222cc], ecx
push 0x10222e0
mov ecx, eax
push 0x104
and ecx, 4
and eax, 8
push edi
mov dword [0x10222c8], ecx
mov dword [0x10222c4], eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
push ebx
push ebx
push 2
push ebx
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x2c8], eax
jne 0x1006600
push edi
push 0x294
call fcn.0100e6ab
push eax
lea eax, [ebp - 0x2c0]
push 0x26c
push eax
call fcn.010161e1
add esp, 0x10
push 1
call fcn.0100db6b
push 0x10
push 0x1001574
lea eax, [ebp - 0x2c0]
push eax
push dword [0x1021df0]
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
call fcn.0100db6b
jmp 0x1006a2a
push 0x7f02
push ebx
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push esi
mov dword [ebp - 0x2dc], eax
call fcn.0100523d
cmp dword [0x10222d0], ebx
mov dword [ebp - 0x2c4], eax
mov esi, 0x1001552
je 0x100663e
push 0x295
call fcn.0100e6ab
jmp 0x1006640
mov eax, esi
push eax
push 0x14
pop edi
lea eax, [ebp - 0x18]
push edi
push eax
call fcn.0101627b
add esp, 0xc
cmp dword [0x10222c8], ebx
je 0x1006665
push 0x296
call fcn.0100e6ab
jmp 0x1006667
mov eax, esi
push eax
lea eax, [ebp - 0x40]
push edi
push eax
call fcn.0101627b
add esp, 0xc
cmp dword [0x10222c4], ebx
je 0x1006689
push 0x297
call fcn.0100e6ab
jmp 0x100668b
mov eax, esi
push eax
lea eax, [ebp - 0x54]
push edi
push eax
call fcn.0101627b
add esp, 0xc
cmp dword [0x10222cc], ebx
je 0x10066ad
push 0x298
call fcn.0100e6ab
jmp 0x10066af
mov eax, esi
push eax
lea eax, [ebp - 0x2c]
push edi
push eax
call fcn.0101627b
add esp, 0xc
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x2c4]
push 0x2c9
call fcn.0100e6ab
push eax
mov esi, 0x26c
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
add esp, 0x20
push ebx
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
lea eax, [ebp - 0x2c0]
push eax
push dword [ebp - 0x2c8]
call edi
push dword [ebp - 0x2c4]
push dword [ebp - 0x2d0]
call fcn.010052f7
mov eax, dword [ebp - 0x2d0]
push dword [eax + 8]
call fcn.010182e3
jmp 0x10069be
push dword [ebp - 0x2c4]
call fcn.010079b3
cmp eax, 1
jne 0x100675e
cmp dword [0x10222d0], ebx
je 0x10069b3
cmp eax, 4
jne 0x100676f
cmp dword [0x10222cc], ebx
je 0x10069b3
cmp eax, 5
jne 0x1006780
cmp dword [0x10222c8], ebx
je 0x10069b3
cmp eax, 6
jne 0x1006791
cmp dword [0x10222c4], ebx
je 0x10069b3
cmp dword [0x1022088], ebx
je 0x10067ac
push dword [ebp - 0x2c4]
call fcn.01003665
test eax, eax
jne 0x10069b3
inc dword [ebp - 0x2d4]
push esi
lea eax, [ebp - 0x2c0]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x26b
push dword [ebp - 0x2c4]
call fcn.01003331
push eax
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010162e8
add esp, 0x10
push ebx
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x2c0]
push eax
push dword [ebp - 0x2c8]
call edi
push dword [ebp - 0x2c4]
call fcn.01003349
cmp eax, ebx
jne 0x100681d
mov eax, 0x1001704
push eax
push 0x1001700
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
add esp, 0x10
push ebx
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x2c0]
push eax
push dword [ebp - 0x2c8]
call edi
cmp dword [0x1020090], ebx
je 0x1006974
push dword [ebp - 0x2c4]
call fcn.0100a9c5
test eax, eax
je 0x10068b2
lea eax, [ebp - 0x2d0]
push eax
push dword [ebp - 0x2c4]
call fcn.0100a9c5
push eax
call fcn.01007010
cmp dword [ebp - 0x2d0], ebx
je 0x10068ab
push eax
push 0x10016f8
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
add esp, 0x10
jmp 0x10068c7
push 0x10016ec
jmp 0x10068b7
push 0x10016e0
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
add esp, 0xc
push ebx
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x2c0]
push eax
push dword [ebp - 0x2c8]
call edi
push dword [ebp - 0x2c4]
call fcn.0100b8e5
test eax, eax
je 0x100693a
lea eax, [ebp - 0x2d8]
push eax
push dword [ebp - 0x2c4]
call fcn.0100b8e5
push eax
call fcn.01007010
cmp dword [ebp - 0x2d8], ebx
je 0x1006933
push eax
push 0x10016f8
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
add esp, 0x10
jmp 0x100694f
push 0x10016ec
jmp 0x100693f
push 0x10016e0
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
add esp, 0xc
push ebx
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x2c0]
push eax
push dword [ebp - 0x2c8]
call edi
push 0x10016dc
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
lea eax, [ebp - 0x2c0]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1006992
push ebx
lea ecx, [ebp - 0x2cc]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x2c0]
push eax
push dword [ebp - 0x2c8]
call edi
push dword [ebp - 0x2c4]
call fcn.01018340
cmp eax, ebx
mov dword [ebp - 0x2c4], eax
jne 0x1006742
push dword [ebp - 0x2d4]
push 0x299
call fcn.0100e6ab
push eax
lea eax, [ebp - 0x2c0]
push esi
push eax
call fcn.010161e1
add esp, 0x10
push ebx
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x2c0]
push eax
push dword [ebp - 0x2c8]
call edi
push dword [ebp - 0x2c8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2dc]
call dword [sym.imp.USER32.dll_SetCursor]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01015dd4
leave
ret 0xc