Function at 0x401140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x23f8
call fcn.00411a10
mov eax, dword [0x43d3a0]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
mov eax, dword [ebp + 0x14]
mov dword [eax], 0xffffffff
cmp dword [ebp + 0x18], 1
jne 0x401171
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
push 0x4323c4
mov edx, dword [ebp + 8]
push edx
call fcn.004058b0
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
jne 0x401199
or eax, 0xffffffff
jmp 0x4018d6
mov eax, dword [ebp - 0x2138]
add eax, 7
mov dword [ebp - 0x2138], eax
push 0x4323cc
mov ecx, dword [ebp - 0x2138]
add ecx, 7
push ecx
call fcn.004058b0
add esp, 8
mov dword [ebp - 0x214c], eax
cmp dword [ebp - 0x214c], 0
je 0x401207
mov edx, dword [ebp - 0x214c]
sub edx, dword [ebp - 0x2138]
push edx
mov eax, dword [ebp - 0x2138]
push eax
lea ecx, [ebp - 0x21b8]
push ecx
call fcn.004118e0
add esp, 0xc
mov edx, dword [ebp - 0x214c]
sub edx, dword [ebp - 0x2138]
mov byte [ebp + edx - 0x21b8], 0
jmp 0x401220
mov eax, dword [ebp - 0x2138]
add eax, 7
push eax
lea ecx, [ebp - 0x21b8]
push ecx
call fcn.00410dd0
add esp, 8
push 0x4323d0
lea edx, [ebp - 0x21b8]
push edx
call fcn.004058b0
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
je 0x401266
mov eax, dword [ebp - 0x2138]
mov byte [eax], 0
mov ecx, dword [ebp - 0x2138]
add ecx, 1
push ecx
call fcn.00411899
add esp, 4
mov dword [ebp - 0x21bc], eax
jmp 0x401270
mov dword [ebp - 0x21bc], 0x50
push 0
push 1
push 2
call dword [0x4322cc]
mov dword [ebp - 0x2128], eax
cmp dword [ebp - 0x2128], 0xffffffff
jne 0x401293
or eax, 0xffffffff
jmp 0x4018d6
lea edx, [ebp - 0x22d4]
push edx
push 0
lea eax, [ebp - 0x21b8]
push eax
push 0x401a20
push 0
push 0
call dword [0x4320dc]
mov dword [ebp - 0x22d0], eax
push 0x3e8
mov ecx, dword [ebp - 0x22d0]
push ecx
call dword [0x4320e4]
cmp eax, 0x102
jne 0x4012d9
or eax, 0xffffffff
jmp 0x4018d6
push 0x10
push 0
lea edx, [ebp - 0x2148]
push edx
call fcn.004117f0
add esp, 0xc
mov eax, 2
mov word [ebp - 0x2148], ax
lea ecx, [ebp - 0x21b8]
push ecx
call fcn.004018f0
add esp, 4
mov dword [ebp - 0x2144], eax
movzx edx, word [ebp - 0x21bc]
push edx
call dword [0x4322c8]
mov word [ebp - 0x2146], ax
mov dword [ebp - 4], 1
lea eax, [ebp - 4]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [0x4322c4]
mov dword [ebp - 0x22c8], 0
mov dword [ebp - 0x22dc], 0
jmp 0x401364
mov edx, dword [ebp - 0x22dc]
add edx, 1
mov dword [ebp - 0x22dc], edx
mov eax, dword [ebp - 0x22dc]
cmp eax, dword [ebp - 0x22c8]
jae 0x40138b
mov ecx, dword [ebp - 0x22dc]
mov edx, dword [ebp + ecx*4 - 0x22c4]
cmp edx, dword [ebp - 0x2128]
jne 0x401389
jmp 0x40138b
jmp 0x401355
mov eax, dword [ebp - 0x22dc]
cmp eax, dword [ebp - 0x22c8]
jne 0x4013c4
cmp dword [ebp - 0x22c8], 0x40
jae 0x4013c4
mov ecx, dword [ebp - 0x22dc]
mov edx, dword [ebp - 0x2128]
mov dword [ebp + ecx*4 - 0x22c4], edx
mov eax, dword [ebp - 0x22c8]
add eax, 1
mov dword [ebp - 0x22c8], eax
xor ecx, ecx
jne 0x401349
push 0x10
lea edx, [ebp - 0x2148]
push edx
mov eax, dword [ebp - 0x2128]
push eax
call dword [0x4322c0]
mov dword [ebp - 0x2134], 0
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x2130], ecx
mov ecx, 0x41
lea esi, [ebp - 0x22c8]
lea edi, [ebp - 0x2120]
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x2134]
push edx
push 0
lea eax, [ebp - 0x2120]
push eax
push 0
push 1
call dword [0x4322bc]
lea ecx, [ebp - 0x2120]
push ecx
mov edx, dword [ebp - 0x2128]
push edx
call fcn.00410862
test eax, eax
jne 0x40144a
mov eax, dword [ebp - 0x2128]
push eax
call dword [0x4322b4]
or eax, 0xffffffff
jmp 0x4018d6
lea ecx, [ebp - 0x21b8]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x4323d4
lea eax, [ebp - 0x2010]
push eax
call fcn.0041163a
add esp, 0x10
lea ecx, [ebp - 0x2010]
push ecx
call fcn.004108b0
add esp, 4
mov dword [ebp - 0x2018], eax
push 0
mov edx, dword [ebp - 0x2018]
push edx
lea eax, [ebp - 0x2010]
push eax
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [0x4322b0]
mov dword [ebp - 0x2014], eax
mov edx, dword [ebp - 0x2014]
cmp edx, dword [ebp - 0x2018]
je 0x4014c4
mov eax, dword [ebp - 0x2128]
push eax
call dword [0x4322b4]
or eax, 0xffffffff
jmp 0x4018d6
mov dword [ebp - 0x212c], 0
mov byte [ebp - 0x22c9], 0
cmp dword [ebp + 0x18], 0
jne 0x401510
push 0x4323f4
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004115d0
add esp, 8
mov dword [ebp - 0x2124], eax
cmp dword [ebp - 0x2124], 0
jne 0x401510
mov edx, dword [ebp - 0x2128]
push edx
call dword [0x4322b4]
or eax, 0xffffffff
jmp 0x4018d6
mov dword [ebp - 0x23f0], 0
mov dword [ebp - 0x22e4], 0
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x22e0], eax
mov dword [ebp - 0x23f4], 0
jmp 0x401548
mov ecx, dword [ebp - 0x23f4]
add ecx, 1
mov dword [ebp - 0x23f4], ecx
mov edx, dword [ebp - 0x23f4]
cmp edx, dword [ebp - 0x23f0]
jae 0x40156f
mov eax, dword [ebp - 0x23f4]
mov ecx, dword [ebp + eax*4 - 0x23ec]
cmp ecx, dword [ebp - 0x2128]
jne 0x40156d
jmp 0x40156f
jmp 0x401539
mov edx, dword [ebp - 0x23f4]
cmp edx, dword [ebp - 0x23f0]
jne 0x4015a8
cmp dword [ebp - 0x23f0], 0x40
jae 0x4015a8
mov eax, dword [ebp - 0x23f4]
mov ecx, dword [ebp - 0x2128]
mov dword [ebp + eax*4 - 0x23ec], ecx
mov edx, dword [ebp - 0x23f0]
add edx, 1
mov dword [ebp - 0x23f0], edx
xor eax, eax
jne 0x40152d
lea ecx, [ebp - 0x22e4]
push ecx
push 0
push 0
lea edx, [ebp - 0x23f0]
push edx
push 1
call dword [0x4322bc]
lea eax, [ebp - 0x23f0]
push eax
mov ecx, dword [ebp - 0x2128]
push ecx
call fcn.00410862
test eax, eax
jne 0x4015f4
mov edx, dword [ebp - 0x2128]
push edx
call dword [0x4322b4]
mov eax, 0xfffffffd
jmp 0x4018d6
push 0
push 0x1000
lea eax, [ebp - 0x1010]
push eax
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [0x4322d8]
mov dword [ebp - 0x2014], eax
mov edx, dword [ebp - 0x2014]
mov byte [ebp + edx - 0x1010], 0
cmp dword [ebp - 0x2014], 0
jg 0x401643
mov eax, dword [ebp - 0x2128]
push eax
call dword [0x4322b4]
mov eax, 0xfffffffc
jmp 0x4018d6
movzx ecx, byte [ebp - 0x22c9]
test ecx, ecx
je 0x4016b2
cmp dword [ebp + 0x18], 0
jne 0x401673
mov edx, dword [ebp - 0x2124]
push edx
push 1
mov eax, dword [ebp - 0x2014]
push eax
lea ecx, [ebp - 0x1010]
push ecx
call fcn.0041148a
add esp, 0x10
cmp dword [ebp + 0x18], 1
jne 0x40169b
mov edx, dword [ebp - 0x2014]
push edx
lea eax, [ebp - 0x1010]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
add edx, dword [ebp - 0x212c]
push edx
call fcn.00410ed0
add esp, 0xc
mov eax, dword [ebp - 0x212c]
add eax, dword [ebp - 0x2014]
mov dword [ebp - 0x212c], eax
jmp 0x40185e
push 0x4323f8
lea ecx, [ebp - 0x1010]
push ecx
call fcn.004058b0
add esp, 8
test eax, eax
je 0x4016df
mov edx, dword [ebp - 0x2128]
push edx
call dword [0x4322b4]
or eax, 0xffffffff
jmp 0x4018d6
push 0x432408
lea eax, [ebp - 0x1010]
push eax
call fcn.004058b0
add esp, 8
test eax, eax
jne 0x40170c
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [0x4322b4]
or eax, 0xffffffff
jmp 0x4018d6
push 0x432418
lea edx, [ebp - 0x1010]
push edx
call fcn.004058b0
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
jne 0x401744
mov eax, dword [ebp - 0x2128]
push eax
call dword [0x4322b4]
or eax, 0xffffffff
jmp 0x4018d6
mov ecx, dword [ebp - 0x2138]
add ecx, 0x10
mov dword [ebp - 0x2138], ecx
mov edx, dword [ebp - 0x2138]
push edx
call fcn.00411899
add esp, 4
mov dword [ebp - 0x22d8], eax
push 0x432428
lea eax, [ebp - 0x1010]
push eax
call fcn.004058b0
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
jne 0x4017a0
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [0x4322b4]
or eax, 0xffffffff
jmp 0x4018d6
mov edx, dword [ebp - 0x2138]
add edx, 4
mov dword [ebp - 0x2138], edx
mov byte [ebp - 0x22c9], 1
mov eax, dword [ebp - 0x2138]
lea ecx, [ebp - 0x1010]
sub eax, ecx
mov edx, dword [ebp - 0x2014]
sub edx, eax
mov dword [ebp - 0x2014], edx
cmp dword [ebp + 0x18], 0
jne 0x401802
mov eax, dword [ebp - 0x2124]
push eax
push 1
mov ecx, dword [ebp - 0x2014]
push ecx
mov edx, dword [ebp - 0x2138]
push edx
call fcn.0041148a
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x22d8]
mov dword [eax], ecx
cmp dword [ebp + 0x18], 1
jne 0x401852
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x22d8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x22d8]
add ecx, 1
push ecx
call fcn.004106c4
add esp, 4
mov dword [ebp - 0x23f8], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x23f8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x2014]
push ecx
mov edx, dword [ebp - 0x2138]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push ecx
call fcn.00410ed0
add esp, 0xc
mov edx, dword [ebp - 0x2014]
mov dword [ebp - 0x212c], edx
mov eax, dword [ebp - 0x22d8]
cmp eax, dword [ebp - 0x212c]
jg 0x401510
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [0x4322b4]
cmp dword [ebp + 0x18], 0
jne 0x401892
mov edx, dword [ebp - 0x2124]
push edx
call fcn.004112ac
add esp, 4
cmp dword [ebp + 0x18], 1
jne 0x4018a7
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x22d8]
mov byte [ecx + edx], 0
cmp dword [ebp + 0x18], 1
jne 0x4018bc
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
jge 0x4018bc
mov eax, 0xfffffffb
jmp 0x4018d6
cmp dword [ebp + 0x18], 1
jne 0x4018d1
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 0
jne 0x4018d1
mov eax, 0xfffffffb
jmp 0x4018d6
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00410dba
mov esp, ebp
pop ebp
ret