Function at 0x10002d40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1002d0d9
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x1003b41c]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x1003b41c]
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 0x10002d91
xor eax, eax
jmp 0x10003024
mov eax, dword [edi + 0x24]
cmp dword [eax], esi
je 0x10002dba
mov ecx, dword [eax]
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x10002dba
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 0x10003024
mov eax, dword [edi + 0x4c]
cmp eax, esi
je 0x10003021
cmp dword [edi + 0x3c], esi
jne 0x10002de7
movsx edx, bl
push eax
push edx
call fcn.10007410
add esp, 8
cmp eax, 0xffffffff
je 0x10003021
mov eax, ebx
jmp 0x10003024
push esi
push 8
lea ecx, [esp + 0x60]
mov byte [esp + 0x1c], bl
call fcn.10003910
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x5c]
mov dword [esp + 0x8c], esi
call fcn.10003be0
mov esi, eax
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 1
call fcn.10003be0
mov ebx, eax
mov ecx, esi
mov byte [esp + 0x88], 2
call fcn.10004820
mov edx, dword [esp + 0x70]
mov ecx, ebx
mov esi, eax
mov dword [esp + 0x1c], edx
call fcn.10004820
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.10001070
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], 0
call fcn.10001070
test esi, esi
jl 0x1000300d
cmp esi, 1
jg 0x10003047
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x5c]
call fcn.10003be0
mov ecx, eax
mov byte [esp + 0x88], 3
call fcn.10004820
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x40]
sub esi, eax
mov byte [esp + 0x88], 0
call fcn.10001070
test esi, esi
jbe 0x10002f17
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x5c]
call fcn.10003be0
mov byte [esp + 0x88], 4
or dword [esp + 0x18], 1
mov ecx, eax
call fcn.10004820
mov edx, dword [edi + 0x4c]
push edx
push esi
push 1
push eax
call fcn.10008ef0
add esp, 0x10
cmp esi, eax
je 0x10002f17
mov bl, 1
jmp 0x10002f19
xor bl, bl
mov dword [esp + 0x88], 0
test byte [esp + 0x18], 1
je 0x10002f39
and dword [esp + 0x18], 0xfffffffe
lea ecx, [esp + 0x4c]
call fcn.10001070
test bl, bl
jne 0x1000300d
lea eax, [esp + 0x14]
mov byte [edi + 0x41], 1
cmp dword [esp + 0x20], eax
jne 0x10003081
test esi, esi
ja 0x10002f6f
cmp dword [esp + 0x70], 0x20
lea ecx, [esp + 0x58]
jae 0x10003011
push 0
push 8
call fcn.10003980
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x5c]
call fcn.10003be0
mov esi, eax
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 1
call fcn.10003be0
mov ebx, eax
mov ecx, esi
mov byte [esp + 0x88], 2
call fcn.10004820
mov esi, eax
mov eax, dword [esp + 0x70]
mov ecx, ebx
mov dword [esp + 0x1c], eax
call fcn.10004820
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.10001070
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], 0
call fcn.10001070
test esi, esi
jge 0x10002e9c
lea ecx, [esp + 0x58]
mov dword [esp + 0x88], 0xffffffff
call fcn.10002660
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.100072a0
mov esp, ebp
pop ebp
ret 4
cmp esi, 3
jne 0x1000300d
mov eax, dword [edi + 0x4c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.10002050
add esp, 8
test al, al
je 0x10003066
mov esi, dword [ebp + 8]
jmp 0x10003069
or esi, 0xffffffff
lea ecx, [esp + 0x58]
mov dword [esp + 0x88], 0xffffffff
call fcn.10002660
mov eax, esi
jmp 0x10003024
lea ecx, [esp + 0x58]
mov dword [esp + 0x88], 0xffffffff
call fcn.10002660
mov eax, dword [ebp + 8]
jmp 0x10003024