Function at 0x10010581
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x1004ee68
call fcn.1004e1f0
sub esp, 0x2e4
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], edi
test ebx, ebx
js 0x10010c28
mov ecx, dword [edi + 0x17c]
mov eax, dword [edi + 0x180]
sub eax, ecx
cdq
mov esi, 0x1c8
idiv esi
cmp ebx, eax
ja 0x10010c28
imul ebx, ebx, 0x1c8
xor eax, eax
cmp dword [ecx + ebx + 0x3c], eax
jne 0x10010c28
cmp dword [ecx + ebx + 4], 1
jne 0x10010991
push 0x103
push eax
mov dword [ecx + ebx + 0x3c], eax
mov byte [ebp - 0x188], al
lea eax, [ebp - 0x187]
push eax
call fcn.10038c70
mov eax, dword [edi + 0x17c]
add eax, 0xd4
sub esp, 0xc
add eax, ebx
mov ecx, esp
push eax
call fcn.10002d1c
lea eax, [ebp - 0x44]
push eax
call fcn.10014fe5
and dword [ebp - 4], 0
cmp dword [ebp - 0x34], 0
ja 0x10010655
mov eax, dword [edi + 0x17c]
add eax, 0x11c
add eax, ebx
cmp dword [eax + 0x14], 0x10
jb 0x1001063e
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x188]
push 0x1005bbe4
push eax
call fcn.10032575
add esp, 0xc
jmp 0x1001068a
lea ecx, [ebx + 0x11c]
add ecx, dword [edi + 0x17c]
cmp dword [ecx + 0x14], 0x10
jb 0x10010669
mov ecx, dword [ecx]
cmp dword [ebp - 0x30], 0x10
push ecx
lea eax, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x188]
push 0x10059f80
push eax
call fcn.10032575
add esp, 0x10
mov esi, 0x1005bbe0
lea eax, [ebp - 0x188]
push esi
push eax
call fcn.10033218
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp + 8], ecx
test ecx, ecx
jne 0x1001071e
push 0x104
push eax
lea eax, [ebp - 0x188]
push eax
call fcn.10038c70
mov eax, dword [edi + 0x17c]
add eax, 0x11c
add eax, ebx
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x100106d1
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x188]
push 0x1005bbec
push eax
call fcn.10032575
add esp, 0xc
lea eax, [ebp - 0x188]
push esi
push eax
call fcn.10033218
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp + 8], eax
test ecx, ecx
jne 0x1001071e
call dword [0x10052148]
push eax
lea eax, [ebp - 0x188]
push eax
push 0x1005bcec
call fcn.1000191e
add esp, 0xc
jmp 0x10010985
mov eax, dword [edi + 0x17c]
add eax, 0x134
mov edx, dword [eax + ebx + 0x10]
add eax, ebx
cmp dword [eax + 0x14], 0x10
jb 0x10010737
mov eax, dword [eax]
push ecx
push edx
push 1
push eax
call fcn.1003405c
push dword [ebp + 8]
mov esi, eax
call fcn.10033552
add esp, 0x14
lea eax, [ebp - 0x188]
push esi
push eax
push 0x1005bc18
call fcn.1000191e
and dword [ebp - 0x50], 0
mov dword [ebp - 0x64], 0x10059f70
mov dword [ebp - 0x4c], 0xf
mov byte [ebp - 0x60], 0
add esp, 8
lea ecx, [ebp - 0x64]
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 1
call fcn.100046cb
push 0x167
lea eax, [ebp - 0x2ef]
push 0
mov byte [ebp - 4], 2
push eax
mov byte [ebp - 0x2f0], 0
call fcn.10038c70
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
mov ecx, edi
call fcn.100112be
cmp dword [eax + 0x14], 0x10
jb 0x100107be
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x2f0]
push 0x1005bc34
push eax
call fcn.10032575
add esp, 0xc
lea ecx, [ebp - 0x7c]
call fcn.10001d92
mov edx, dword [edi + 0x17c]
add edx, 0x104
add edx, ebx
lea ecx, [ebp - 0x2c]
call fcn.1000a36c
test al, al
je 0x10010947
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x188]
push eax
call fcn.100104be
test eax, eax
jne 0x10010923
push 5
xor esi, esi
push esi
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x188]
push eax
push 0x1005bc3c
push esi
call dword [0x10052228]
cmp eax, 0x20
ja 0x10010907
cmp esi, 5
jg 0x10010887
inc esi
push esi
lea ecx, [ebp - 0x2f0]
push ecx
push eax
push 0x1005bc44
call fcn.1000191e
add esp, 0x10
push 0x3e8
call dword [0x1005214c]
push 5
push 0
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x188]
push eax
push 0x1005bc3c
push 0
call dword [0x10052228]
cmp eax, 0x20
jbe 0x1001083c
mov dword [ebp + 8], eax
cmp eax, 0x20
ja 0x10010907
cmp esi, 5
jl 0x10010907
push 0x1cc
call fcn.10032f3c
pop ecx
push dword [ebp + 8]
mov edi, eax
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x188]
push eax
push 0x1005bc70
push edi
call fcn.10032575
mov ecx, dword [ebp - 0x14]
add esp, 0x14
mov eax, dword [ecx + 0x17c]
push edi
mov dword [eax + ebx + 0x20], 6
mov esi, dword [ecx + 0x17c]
call fcn.1000191f
pop ecx
push eax
lea ecx, [ebx + 0x17c]
push edi
add ecx, esi
call fcn.10003271
mov ecx, dword [ebp - 0x14]
push edi
mov eax, dword [ecx + 0x17c]
and dword [eax + ebx + 0x3c], 0
call fcn.10032f04
mov edi, dword [ebp - 0x14]
pop ecx
jmp 0x10010975
mov eax, dword [edi + 0x17c]
mov dword [eax + ebx + 0x3c], 1
lea eax, [ebp - 0x2f0]
push eax
push 0x1005bc98
jmp 0x1001093d
mov eax, dword [edi + 0x17c]
mov dword [eax + ebx + 0x3c], 1
lea eax, [ebp - 0x2f0]
push eax
push 0x1005bcb0
call fcn.1000191e
add esp, 8
jmp 0x10010975
lea ecx, [ebx + 0x104]
add ecx, dword [edi + 0x17c]
cmp dword [ecx + 0x14], 0x10
jb 0x1001095b
mov ecx, dword [ecx]
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push ecx
push eax
push 0x1005bcc8
call fcn.1000191e
add esp, 0xc
lea ecx, [ebp - 0x2c]
call fcn.10001d92
lea ecx, [ebp - 0x64]
call fcn.100045bc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.10001d92
mov eax, dword [edi + 0x17c]
cmp dword [eax + ebx + 4], 4
jne 0x10010a04
add eax, 0x134
add eax, ebx
cmp dword [eax + 0x14], 0x10
jb 0x100109ad
mov eax, dword [eax]
push ecx
mov ecx, esp
push eax
call fcn.1000c0f3
call fcn.1001030e
test eax, eax
mov eax, dword [edi + 0x17c]
je 0x100109cf
mov dword [eax + ebx + 0x3c], 1
jmp 0x10010a04
and dword [eax + ebx + 0x3c], 0
mov eax, dword [edi + 0x17c]
push 0x1005bd08
mov dword [eax + ebx + 0x20], 3
call fcn.1000191f
pop ecx
push eax
lea ecx, [ebx + 0x17c]
add ecx, dword [edi + 0x17c]
push 0x1005bd08
call fcn.10001f26
mov ecx, dword [edi + 0x17c]
cmp dword [ecx + ebx + 4], 6
jne 0x10010c21
mov edx, dword [ecx + ebx + 0x144]
cmp dword [ecx + ebx + 8], edx
je 0x10010a2f
mov eax, dword [edi + 0x18]
mov dword [edi + 0x1c], eax
mov dword [edi + 0x18], 0x3e8
add ecx, 0x134
add ecx, ebx
mov dword [ebp - 4], 3
cmp dword [ecx + 0x14], 0x10
jb 0x10010a46
mov ecx, dword [ecx]
sub esp, 0x18
call fcn.1001adce
mov ecx, eax
add esp, 0x18
mov dword [ebp + 8], ecx
test ecx, ecx
jne 0x10010a67
mov eax, dword [edi + 0x18]
mov dword [edi + 0x1c], eax
mov dword [edi + 0x18], 0x3e8
mov eax, dword [edi + 0x17c]
cmp dword [eax + ebx + 0xb4], 0
jbe 0x10010bdf
lea edx, [ebx + 0xa4]
add edx, eax
cmp dword [edx + 0x14], 0x10
jb 0x10010a8b
mov edx, dword [edx]
call fcn.1001b079
mov esi, eax
test esi, esi
je 0x10010b6e
mov ecx, dword [edi + 0x17c]
lea eax, [ebp - 0x2c]
mov dword [ecx + ebx + 0x3c], 1
push eax
mov ecx, edi
call fcn.100112be
mov byte [ebp - 4], 4
cmp dword [ebp - 0x1c], 0
ja 0x10010ad6
push 0x1005bd24
call fcn.1000191f
pop ecx
push eax
push 0x1005bd24
lea ecx, [ebp - 0x2c]
call fcn.10001f26
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call esi
pop ecx
mov esi, eax
lea eax, [ebp + 8]
push eax
lea ecx, [edi + 0x194]
call fcn.10015a98
mov eax, dword [edi + 0x17c]
cmp esi, 0xffffffff
jne 0x10010b37
and dword [eax + ebx + 0x3c], 0
mov eax, dword [edi + 0x17c]
mov dword [eax + ebx + 0x20], 4
mov esi, dword [edi + 0x17c]
add esi, ebx
mov ebx, 0x1005bd2c
push ebx
call fcn.1000191f
pop ecx
push eax
push ebx
lea ecx, [esi + 0x17c]
call fcn.10001f26
jmp 0x10010b61
cmp dword [ebp - 0x18], 0x10
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
add eax, 0x11c
add eax, ebx
cmp dword [eax + 0x14], 0x10
jb 0x10010b51
mov eax, dword [eax]
push esi
push ecx
push eax
push 0x1005bd44
call fcn.1000191e
add esp, 0x10
lea ecx, [ebp - 0x2c]
call fcn.10001d92
jmp 0x10010c21
mov eax, dword [edi + 0x17c]
push 0x1005bd70
and dword [eax + ebx + 0x3c], 0
mov eax, dword [edi + 0x17c]
mov dword [eax + ebx + 0x20], 3
call fcn.1000191f
pop ecx
push eax
lea ecx, [ebx + 0x17c]
add ecx, dword [edi + 0x17c]
push 0x1005bd70
call fcn.10001f26
mov eax, dword [edi + 0x17c]
lea ecx, [ebx + 0xa4]
add ecx, eax
cmp dword [ecx + 0x14], 0x10
jb 0x10010bbf
mov ecx, dword [ecx]
add eax, 0x11c
add eax, ebx
cmp dword [eax + 0x14], 0x10
jb 0x10010bce
mov eax, dword [eax]
push ecx
push eax
push 0x1005bd88
call fcn.1000191e
add esp, 0xc
jmp 0x10010c21
mov dword [eax + ebx + 0x3c], 1
mov eax, dword [edi + 0x17c]
mov dword [eax + ebx + 0x20], 5
mov esi, dword [edi + 0x17c]
add esi, ebx
mov ebx, 0x1005bdb4
push ebx
call fcn.1000191f
pop ecx
push eax
push ebx
lea ecx, [esi + 0x17c]
call fcn.10001f26
jmp 0x10010c21
mov dword [edi + 0x6c], 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4