Function at 0x417030
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x30
mov eax, dword [0x4fa5ac]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
mov ebx, dword [esp + 0x38]
mov edx, ecx
mov dword [esp + 8], edx
cmp ebx, 0xffffffff
jne 0x417062
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00439589
add esp, 0x30
ret 4
mov ecx, dword [edx + 0x24]
cmp dword [ecx], 0
push esi
je 0x41709b
mov eax, dword [edx + 0x34]
mov ecx, dword [ecx]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x41709b
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00439589
add esp, 0x30
ret 4
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x4170ba
cmp dword [edx + 0x3c], 0
jne 0x4170d0
push eax
movsx eax, bl
push eax
call fcn.0043cfe1
add esp, 8
cmp eax, 0xffffffff
jne 0x417086
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00439589
add esp, 0x30
ret 4
mov ecx, 0xf
xor eax, eax
mov byte [esp + 0x1c], 0
mov byte [esp + 8], bl
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], 8
cmp ecx, 0x10
jae 0x4170fd
lea eax, [esp + 0x1c]
push ebp
mov byte [eax + 8], 0
push edi
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
nop
cmp edx, 0x10
jb 0x417356
mov ebp, eax
test eax, eax
je 0x41713f
mov ecx, eax
cmp edx, 0x10
jae 0x41712a
lea ecx, [esp + 0x24]
cmp ecx, ebp
ja 0x41713f
mov ecx, eax
cmp edx, 0x10
jae 0x417139
lea ecx, [esp + 0x24]
add ecx, ebx
cmp ebp, ecx
jbe 0x417150
call fcn.004394f9
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x20]
cmp ecx, 0xfffffffc
je 0x41717b
mov ecx, eax
cmp edx, 0x10
jae 0x417164
lea ecx, [esp + 0x24]
add ecx, ebx
cmp ebp, ecx
jb 0x41717b
call fcn.004394f9
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
mov edi, ebx
cmp edx, 0x10
jb 0x41735f
mov esi, eax
test eax, eax
je 0x4171ac
mov ecx, eax
cmp edx, 0x10
jae 0x417197
lea ecx, [esp + 0x24]
cmp ecx, esi
ja 0x4171ac
mov ecx, eax
cmp edx, 0x10
jae 0x4171a6
lea ecx, [esp + 0x24]
add ecx, ebx
cmp esi, ecx
jbe 0x4171bd
call fcn.004394f9
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x20]
cmp ecx, 0xfffffffc
je 0x4171da
cmp edx, 0x10
jae 0x4171cf
lea eax, [esp + 0x24]
add eax, ebx
cmp esi, eax
jb 0x4171da
call fcn.004394f9
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [esp + 0x18]
push eax
add ebp, edi
push ebp
push esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x21]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [ebx + 0x44]
push eax
call edx
test eax, eax
jl 0x4173fd
cmp eax, 1
jg 0x41737a
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x24]
cmp edx, 0x10
jb 0x417368
mov esi, eax
test eax, eax
je 0x417250
mov ecx, eax
cmp edx, 0x10
jae 0x417237
lea ecx, [esp + 0x24]
cmp ecx, esi
ja 0x417250
mov ecx, eax
cmp edx, 0x10
jae 0x417246
lea ecx, [esp + 0x24]
mov ebx, dword [esp + 0x34]
add ecx, ebx
cmp esi, ecx
jbe 0x417261
call fcn.004394f9
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x20]
cmp ecx, 0xfffffffc
je 0x41728c
mov ecx, eax
cmp edx, 0x10
jae 0x417275
lea ecx, [esp + 0x24]
add ecx, ebx
cmp esi, ecx
jb 0x41728c
call fcn.004394f9
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
sub edi, esi
je 0x41731d
cmp edx, 0x10
jb 0x417371
mov esi, eax
test eax, eax
je 0x4172c7
mov ecx, eax
cmp edx, 0x10
jae 0x4172b2
lea ecx, [esp + 0x24]
cmp ecx, esi
ja 0x4172c7
mov ecx, eax
cmp edx, 0x10
jae 0x4172c1
lea ecx, [esp + 0x24]
add ecx, ebx
cmp esi, ecx
jbe 0x4172d8
call fcn.004394f9
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x20]
cmp ecx, 0xfffffffc
je 0x4172f5
cmp edx, 0x10
jae 0x4172ea
lea eax, [esp + 0x24]
add eax, ebx
cmp esi, eax
jb 0x4172f5
call fcn.004394f9
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x4c]
push eax
push edi
push 1
push esi
call fcn.0043d3b2
add esp, 0x10
cmp edi, eax
jne 0x4173fd
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov byte [ecx + 0x41], 1
lea ecx, [esp + 0x10]
cmp dword [esp + 0x1c], ecx
jne 0x4173db
test edi, edi
ja 0x417110
lea ecx, [esp + 0x20]
cmp ebx, 0x20
jae 0x417401
push 0
push 8
call fcn.00409e80
jmp 0x417103
lea ebp, [esp + 0x24]
jmp 0x41711f
lea esi, [esp + 0x24]
jmp 0x41718c
lea esi, [esp + 0x24]
jmp 0x41722c
lea esi, [esp + 0x24]
jmp 0x4172a7
cmp eax, 3
jne 0x4173fd
mov edx, dword [ebx + 0x4c]
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.004169f0
add esp, 8
test al, al
je 0x4173b8
mov esi, dword [esp + 0x44]
lea ecx, [esp + 0x20]
call fcn.004018f0
pop edi
pop ebp
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00439589
add esp, 0x30
ret 4
lea ecx, [esp + 0x20]
or esi, 0xffffffff
call fcn.004018f0
pop edi
pop ebp
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00439589
add esp, 0x30
ret 4
lea ecx, [esp + 0x20]
call fcn.004018f0
mov eax, dword [esp + 0x44]
pop edi
pop ebp
pop esi
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00439589
add esp, 0x30
ret 4
lea ecx, [esp + 0x20]
call fcn.004018f0
mov ecx, dword [esp + 0x3c]
pop edi
pop ebp
pop esi
pop ebx
xor ecx, esp
or eax, 0xffffffff
call fcn.00439589
add esp, 0x30
ret 4