Function at 0x100462b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x103447a9
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x10525930]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x10525930]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor esi, esi
mov edi, ecx
mov dword [esp + 0x18], esi
cmp ebx, 0xffffffff
jne 0x10046301
xor eax, eax
jmp 0x10046594
mov eax, dword [edi + 0x24]
cmp dword [eax], esi
je 0x1004632a
mov ecx, dword [eax]
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x1004632a
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 0x10046594
mov eax, dword [edi + 0x4c]
cmp eax, esi
je 0x10046591
cmp dword [edi + 0x3c], esi
jne 0x10046357
movsx edx, bl
push eax
push edx
call fcn.1025d130
add esp, 8
cmp eax, 0xffffffff
je 0x10046591
mov eax, ebx
jmp 0x10046594
push esi
push 8
lea ecx, [esp + 0x60]
mov byte [esp + 0x1c], bl
call fcn.10046d90
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x5c]
mov dword [esp + 0x8c], esi
call fcn.10018920
mov esi, eax
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 1
call fcn.10018920
mov ebx, eax
mov ecx, esi
mov byte [esp + 0x88], 2
call fcn.100088b0
mov edx, dword [esp + 0x70]
mov ecx, ebx
mov esi, eax
mov dword [esp + 0x1c], edx
call fcn.100088b0
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea ebx, [esp + 0x24]
push ebx
mov ebx, dword [esp + 0x20]
add ebx, esi
push ebx
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x25]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [edi + 0x44]
push eax
call edx
lea ecx, [esp + 0x34]
mov esi, eax
mov byte [esp + 0x88], 1
call fcn.10001230
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], 0
call fcn.10001230
test esi, esi
jl 0x1004657d
cmp esi, 1
jg 0x100465b7
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x5c]
call fcn.10018920
mov ecx, eax
mov byte [esp + 0x88], 3
call fcn.100088b0
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x40]
sub esi, eax
mov byte [esp + 0x88], 0
call fcn.10001230
test esi, esi
jbe 0x10046487
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x5c]
call fcn.10018920
mov byte [esp + 0x88], 4
or dword [esp + 0x18], 1
mov ecx, eax
call fcn.100088b0
mov edx, dword [edi + 0x4c]
push edx
push esi
push 1
push eax
call fcn.1025e150
add esp, 0x10
cmp esi, eax
je 0x10046487
mov bl, 1
jmp 0x10046489
xor bl, bl
mov dword [esp + 0x88], 0
test byte [esp + 0x18], 1
je 0x100464a9
and dword [esp + 0x18], 0xfffffffe
lea ecx, [esp + 0x4c]
call fcn.10001230
test bl, bl
jne 0x1004657d
lea eax, [esp + 0x14]
mov byte [edi + 0x41], 1
cmp dword [esp + 0x20], eax
jne 0x100465f1
test esi, esi
ja 0x100464df
cmp dword [esp + 0x70], 0x20
lea ecx, [esp + 0x58]
jae 0x10046581
push 0
push 8
call fcn.10005f00
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x5c]
call fcn.10018920
mov esi, eax
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 1
call fcn.10018920
mov ebx, eax
mov ecx, esi
mov byte [esp + 0x88], 2
call fcn.100088b0
mov esi, eax
mov eax, dword [esp + 0x70]
mov ecx, ebx
mov dword [esp + 0x1c], eax
call fcn.100088b0
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea ebx, [esp + 0x24]
push ebx
mov ebx, dword [esp + 0x20]
add ebx, esi
push ebx
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x25]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [edi + 0x44]
push eax
call edx
lea ecx, [esp + 0x34]
mov esi, eax
mov byte [esp + 0x88], 1
call fcn.10001230
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], 0
call fcn.10001230
test esi, esi
jge 0x1004640c
lea ecx, [esp + 0x58]
mov dword [esp + 0x88], 0xffffffff
call fcn.10003790
or eax, 0xffffffff
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.102595a0
mov esp, ebp
pop ebp
ret 4
cmp esi, 3
jne 0x1004657d
mov eax, dword [edi + 0x4c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.100412f0
add esp, 8
test al, al
je 0x100465d6
mov esi, dword [ebp + 8]
jmp 0x100465d9
or esi, 0xffffffff
lea ecx, [esp + 0x58]
mov dword [esp + 0x88], 0xffffffff
call fcn.10003790
mov eax, esi
jmp 0x10046594
lea ecx, [esp + 0x58]
mov dword [esp + 0x88], 0xffffffff
call fcn.10003790
mov eax, dword [ebp + 8]
jmp 0x10046594