Function at 0x42d170
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52a008
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x580ca0]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov eax, dword [0x580ca0]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edi, ecx
cmp ebx, 0xffffffff
jne 0x42d1b8
xor eax, eax
jmp 0x42d40c
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x42d1e1
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x42d1e1
dec dword [eax]
mov edi, dword [edi + 0x24]
mov eax, dword [edi]
lea ecx, [eax + 1]
mov dword [edi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x42d40c
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x42d409
cmp dword [edi + 0x3c], 0
jne 0x42d20f
movsx edx, bl
push eax
push edx
call fcn.004c08e4
add esp, 8
cmp eax, 0xffffffff
je 0x42d409
mov eax, ebx
jmp 0x42d40c
push 0
push 8
lea ecx, [esp + 0x44]
mov byte [esp + 0x18], bl
call fcn.0042dbd0
mov dword [esp + 0x68], 0
jmp 0x42d230
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x40]
call fcn.00401120
mov esi, eax
cmp dword [esi], 0xfffffffc
je 0x42d26b
mov ecx, esi
call fcn.004060e0
test al, al
jne 0x42d255
call fcn.004bd101
mov ecx, dword [esi]
call fcn.00403320
mov ecx, dword [esi]
add eax, dword [ecx + 0x14]
cmp dword [esi + 4], eax
jb 0x42d26b
call fcn.004bd101
mov ebx, dword [esi + 4]
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x40]
call fcn.00401120
mov esi, eax
cmp dword [esi], 0xfffffffc
je 0x42d2a9
mov ecx, esi
call fcn.004060e0
test al, al
jne 0x42d293
call fcn.004bd101
mov ecx, dword [esi]
call fcn.00403320
mov ecx, dword [esi]
add eax, dword [ecx + 0x14]
cmp dword [esi + 4], eax
jb 0x42d2a9
call fcn.004bd101
mov esi, dword [esi + 4]
lea ecx, [esp + 0x3c]
call fcn.004034e0
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
add eax, ebx
lea ebx, [esp + 0x14]
push ebx
push eax
push esi
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x21]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [edi + 0x44]
push eax
call edx
test eax, eax
jl 0x42d400
cmp eax, 1
jg 0x42d3b8
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x40]
call fcn.00401120
mov ebx, eax
cmp dword [ebx], 0xfffffffc
je 0x42d327
mov ecx, ebx
call fcn.004060e0
test al, al
jne 0x42d311
call fcn.004bd101
mov ecx, dword [ebx]
call fcn.00403320
mov ecx, dword [ebx]
add eax, dword [ecx + 0x14]
cmp dword [ebx + 4], eax
jb 0x42d327
call fcn.004bd101
mov esi, dword [esp + 0x14]
sub esi, dword [ebx + 4]
je 0x42d382
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x40]
call fcn.00401120
mov ebx, eax
cmp dword [ebx], 0xfffffffc
je 0x42d36b
mov ecx, ebx
call fcn.004060e0
test al, al
jne 0x42d355
call fcn.004bd101
mov ecx, dword [ebx]
call fcn.00403320
mov ecx, dword [ebx]
add eax, dword [ecx + 0x14]
cmp dword [ebx + 4], eax
jb 0x42d36b
call fcn.004bd101
mov edx, dword [edi + 0x4c]
mov ebx, dword [ebx + 4]
push edx
push esi
push 1
push ebx
call fcn.004bb52b
add esp, 0x10
cmp esi, eax
jne 0x42d400
lea eax, [esp + 0x10]
mov byte [edi + 0x41], 1
cmp dword [esp + 0x18], eax
jne 0x42d3f2
test esi, esi
ja 0x42d230
lea ecx, [esp + 0x3c]
call fcn.004034e0
lea ecx, [esp + 0x3c]
cmp eax, 0x20
jae 0x42d404
push 0
push 8
call fcn.00401a10
jmp 0x42d230
cmp eax, 3
jne 0x42d400
mov ecx, dword [edi + 0x4c]
mov edx, dword [esp + 0x10]
push ecx
push edx
call fcn.0042c360
add esp, 8
test al, al
je 0x42d3e2
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x3c]
call fcn.00402c20
mov eax, esi
jmp 0x42d40c
lea ecx, [esp + 0x3c]
or esi, 0xffffffff
call fcn.00402c20
mov eax, esi
jmp 0x42d40c
lea ecx, [esp + 0x3c]
call fcn.00402c20
mov eax, dword [ebp + 8]
jmp 0x42d40c
lea ecx, [esp + 0x3c]
call fcn.00402c20
or eax, 0xffffffff
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004ba1db
mov esp, ebp
pop ebp
ret 4