Function at 0x401d70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], 0
push edi
mov dword [ebp - 0x1c], 0
cmp dword [esi + 0x70], 0
mov edi, dword [esi + 0xb4]
mov ebx, edi
mov eax, dword [esi + 0x4c]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], ebx
je 0x4023bd
mov ecx, dword [esi + 0x64]
mov edx, dword [esi + 0x3c]
mov eax, dword [esi]
sub edx, ecx
cmp ecx, dword [esi + 0x3c]
mov dword [ebp - 0x20], eax
sbb eax, eax
mov dword [ebp - 0x14], 0
and eax, edx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], eax
lea edx, [esi + 4]
mov eax, dword [esi + 0x18]
xor ecx, ecx
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0xa8]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
test eax, eax
jle 0x401e98
nop dword [eax + eax]
mov edi, ebx
sub edi, dword [ebp - 4]
lea eax, [edi + 0x18]
cmp eax, dword [edx]
jle 0x401e47
test byte [esi + 0xc8], 1
je 0x401e1f
cmp dword [esi + 0xd0], 0
je 0x401e1f
push edi
push 0x40f0fc
push 1
push esi
call fcn.00401010
add esp, 0x10
test edi, edi
je 0x401e3c
push dword [esi + 0xb0]
mov eax, dword [esi + 0xcc]
push esi
push edi
mov edi, dword [ebp - 4]
push edi
call eax
add esp, 0x10
jmp 0x401e3f
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x2c]
lea edx, [esi + 4]
mov ebx, edi
mov eax, dword [esi + 0xa4]
mov edi, dword [eax + ecx*8]
mov eax, dword [eax + ecx*8 + 4]
inc ecx
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x20]
mov dword [ebx + 8], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx], edi
mov edi, dword [ebp - 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x28]
mov word [ebx + 6], di
mov edi, dword [ebp - 4]
mov word [ebx + 4], 0x52
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], 0
add ebx, 0x18
mov dword [ebp - 0x2c], ecx
cmp ecx, dword [ebp - 0x30]
jl 0x401df0
mov dword [ebp - 0x18], ebx
cmp dword [esi + 0x40], 0
mov dword [esi + 0xa8], 0
jne 0x401f1c
mov ecx, dword [esi + 0x78]
test ecx, ecx
jne 0x401ec6
mov eax, dword [esi + 0x4c]
lea edx, [esi + 4]
add eax, 0x1b58
mov dword [esi + 0x78], 0x1b58
mov dword [esi + 0x74], eax
jmp 0x401f2a
mov edx, dword [esi + 0x4c]
mov eax, edx
sub eax, dword [esi + 0x74]
js 0x401f17
cmp ecx, 0x1b58
jae 0x401ef2
mov eax, 0x2904
mov dword [esi + 0x78], 0x2904
add eax, edx
or dword [esi + 0x48], 1
mov dword [esi + 0x74], eax
lea edx, [esi + 4]
jmp 0x401f2a
mov eax, ecx
shr eax, 1
add eax, ecx
mov dword [esi + 0x78], eax
cmp eax, 0x1d4c0
jbe 0x401f0e
mov dword [esi + 0x78], 0x1d4c0
mov eax, 0x1d4c0
add eax, edx
or dword [esi + 0x48], 1
mov dword [esi + 0x74], eax
lea edx, [esi + 4]
jmp 0x401f2a
mov dword [esi + 0x74], 0
mov dword [esi + 0x78], 0
test byte [esi + 0x48], 1
lea ecx, [esi + 0x48]
je 0x401fbc
mov eax, ebx
sub eax, edi
mov dword [ebp - 0x18], eax
add eax, 0x18
cmp eax, dword [edx]
jle 0x401f8b
test byte [esi + 0xc8], 1
mov ebx, dword [ebp - 0x18]
je 0x401f6b
cmp dword [esi + 0xd0], 0
je 0x401f6b
push ebx
push 0x40f0fc
push 1
push esi
call fcn.00401010
add esp, 0x10
test ebx, ebx
je 0x401f83
push dword [esi + 0xb0]
mov eax, dword [esi + 0xcc]
push esi
push ebx
push edi
call eax
add esp, 0x10
mov ebx, edi
lea ecx, [esi + 0x48]
lea edx, [esi + 4]
mov eax, dword [ebp - 0x20]
mov dword [ebx], eax
mov eax, dword [ebp - 0xc]
mov word [ebx + 6], ax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x28]
mov word [ebx + 4], 0x53
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], 0
add ebx, 0x18
mov dword [ebp - 0x18], ebx
test byte [ecx], 2
je 0x402047
mov eax, ebx
sub eax, edi
mov dword [ebp - 0x18], eax
add eax, 0x18
cmp eax, dword [edx]
jle 0x402016
test byte [esi + 0xc8], 1
mov ebx, dword [ebp - 0x18]
je 0x401ff9
cmp dword [esi + 0xd0], 0
je 0x401ff9
push ebx
push 0x40f0fc
push 1
push esi
call fcn.00401010
add esp, 0x10
test ebx, ebx
je 0x402011
push dword [esi + 0xb0]
mov eax, dword [esi + 0xcc]
push esi
push ebx
push edi
call eax
add esp, 0x10
mov ebx, edi
lea ecx, [esi + 0x48]
mov eax, dword [ebp - 0x20]
mov dword [ebx], eax
mov eax, dword [ebp - 0xc]
mov word [ebx + 6], ax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x28]
mov word [ebx + 4], 0x54
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], 0
add ebx, 0x18
mov dword [ebp - 0x18], ebx
mov dword [ecx], 0
mov ecx, dword [esi + 0x40]
cmp dword [esi + 0x38], ecx
cmovbe ecx, dword [esi + 0x38]
cmp dword [esi + 0xc0], 0
mov dword [ebp - 0x28], ecx
jne 0x40206d
cmp dword [esi + 0x44], ecx
cmovbe ecx, dword [esi + 0x44]
mov dword [ebp - 0x28], ecx
mov eax, dword [esi + 0x14]
sub eax, dword [esi + 0x10]
sub eax, ecx
jns 0x40211c
mov ebx, dword [ebp - 0xc]
lea edi, [esi + 0x84]
mov edx, dword [edi]
cmp edi, edx
je 0x402119
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov ecx, dword [ebp - 8]
mov dword [edx], 0
mov dword [edx + 4], 0
mov eax, dword [esi + 0x98]
mov dword [edx + 4], eax
lea eax, [esi + 0x94]
mov dword [edx], eax
mov eax, dword [esi + 0x98]
mov dword [eax], edx
dec dword [esi + 0x68]
inc dword [esi + 0x60]
mov eax, dword [esi]
mov dword [esi + 0x98], edx
mov dword [edx + 8], eax
mov dword [edx + 0xc], 0x51
mov dword [edx + 0x14], ebx
mov dword [edx + 0x18], ecx
mov eax, dword [esi + 0x14]
mov dword [edx + 0x1c], eax
inc dword [esi + 0x14]
mov eax, dword [esi + 0x18]
mov dword [edx + 0x20], eax
mov dword [edx + 0x28], ecx
mov eax, dword [esi + 0x30]
mov dword [edx + 0x2c], eax
mov dword [edx + 0x30], 0
mov dword [edx + 0x34], 0
mov eax, dword [esi + 0x14]
sub eax, dword [esi + 0x10]
sub eax, dword [ebp - 0x28]
js 0x402084
mov ebx, dword [ebp - 0x18]
mov eax, dword [esi + 0xb8]
or ecx, 0xffffffff
test eax, eax
cmovg ecx, eax
cmp dword [esi + 0x6c], 0
mov dword [ebp - 0x24], ecx
jne 0x40213e
mov eax, dword [esi + 0x30]
sar eax, 3
mov dword [ebp - 0x2c], eax
jmp 0x402145
mov dword [ebp - 0x2c], 0
mov edi, dword [esi + 0x94]
lea eax, [esi + 0x94]
cmp edi, eax
je 0x4022f4
nop dword [eax]
mov edx, dword [edi + 0x34]
lea ecx, [edi + 0x28]
mov dword [ebp - 0x30], ecx
test edx, edx
jne 0x402182
mov dword [edi + 0x34], 1
mov eax, dword [esi + 0x30]
mov dword [edi + 0x2c], eax
add eax, dword [ebp - 0x2c]
jmp 0x402207
mov eax, dword [ebp - 8]
sub eax, dword [ecx]
js 0x4021d6
lea eax, [edx + 1]
mov dword [edi + 0x34], eax
inc dword [esi + 0x58]
mov eax, dword [esi + 0x6c]
test eax, eax
jne 0x4021b5
mov eax, dword [edi + 0x2c]
mov ecx, dword [esi + 0x30]
cmp eax, ecx
mov dword [ebp - 0x1c], 1
cmovae ecx, eax
add eax, ecx
mov ecx, dword [ebp - 0x30]
mov dword [edi + 0x2c], eax
jmp 0x402207
cmp eax, 2
jae 0x4021bf
mov eax, dword [edi + 0x2c]
jmp 0x4021c2
mov eax, dword [esi + 0x30]
cdq
sub eax, edx
mov dword [ebp - 0x1c], 1
sar eax, 1
add dword [edi + 0x2c], eax
mov eax, dword [edi + 0x2c]
jmp 0x402207
mov eax, dword [ebp - 0x24]
cmp dword [edi + 0x30], eax
jb 0x4022e4
mov eax, dword [esi + 0xbc]
cmp edx, eax
jle 0x4021f4
test eax, eax
jg 0x4022e4
inc dword [ebp - 0x10]
lea eax, [edx + 1]
mov dword [edi + 0x34], eax
mov eax, dword [edi + 0x2c]
mov dword [edi + 0x30], 0
add eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ecx], eax
mov ecx, ebx
mov eax, dword [ebp - 8]
sub ecx, edx
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0xc]
mov dword [edi + 0x14], eax
mov eax, dword [esi + 0x18]
mov dword [edi + 0x20], eax
mov eax, dword [edi + 0x24]
add eax, 0x18
mov dword [ebp - 0x30], ecx
add eax, ecx
cmp eax, dword [esi + 4]
jle 0x402287
test byte [esi + 0xc8], 1
je 0x40226a
cmp dword [esi + 0xd0], 0
je 0x40226a
push ecx
push 0x40f0fc
push 1
push esi
call fcn.00401010
mov eax, dword [ebp - 0x10]
add esp, 0x10
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
test ecx, ecx
je 0x402285
push dword [esi + 0xb0]
mov eax, dword [esi + 0xcc]
push esi
push ecx
push edx
call eax
mov edx, dword [ebp - 4]
add esp, 0x10
mov ebx, edx
mov eax, dword [edi + 8]
mov dword [ebx], eax
movzx eax, byte [edi + 0xc]
mov byte [ebx + 4], al
movzx eax, byte [edi + 0x10]
mov byte [ebx + 5], al
mov ax, word [edi + 0x14]
mov word [ebx + 6], ax
mov eax, dword [edi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0x1c]
mov dword [ebx + 0xc], eax
mov eax, dword [edi + 0x20]
mov dword [ebx + 0x10], eax
mov eax, dword [edi + 0x24]
mov dword [ebx + 0x14], eax
add ebx, 0x18
mov eax, dword [edi + 0x24]
test eax, eax
je 0x4022d5
push eax
lea eax, [edi + 0x38]
push eax
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
add ebx, dword [edi + 0x24]
mov eax, dword [edi + 0x34]
cmp eax, dword [esi + 0x7c]
jb 0x4022e4
mov dword [esi + 0xc], 0xffffffff
mov edi, dword [edi]
lea eax, [esi + 0x94]
cmp edi, eax
jne 0x402160
mov edi, dword [ebp - 4]
sub ebx, edi
test ebx, ebx
jle 0x402334
test byte [esi + 0xc8], 1
je 0x402320
cmp dword [esi + 0xd0], 0
je 0x402320
push ebx
push 0x40f0fc
push 1
push esi
call fcn.00401010
add esp, 0x10
push dword [esi + 0xb0]
mov eax, dword [esi + 0xcc]
push esi
push ebx
push edi
call eax
add esp, 0x10
cmp dword [ebp - 0x10], 0
je 0x402372
mov eax, dword [esi + 0x14]
sub eax, dword [esi + 0x10]
shr eax, 1
mov dword [esi + 0x24], eax
cmp eax, 2
jae 0x402356
mov dword [esi + 0x24], 2
mov eax, 2
mov ecx, dword [ebp - 0x24]
lea edi, [esi + 8]
add ecx, eax
lea edx, [esi + 0x44]
mov eax, dword [edi]
lea ebx, [esi + 0x80]
imul eax, ecx
mov dword [edx], ecx
mov dword [ebx], eax
jmp 0x40237e
lea edx, [esi + 0x44]
lea edi, [esi + 8]
lea ebx, [esi + 0x80]
cmp dword [ebp - 0x1c], 0
je 0x4023ae
mov eax, dword [ebp - 0x28]
shr eax, 1
mov dword [esi + 0x24], eax
cmp eax, 2
jae 0x4023a4
mov dword [esi + 0x24], 2
lea edx, [esi + 0x44]
lea edi, [esi + 8]
lea ebx, [esi + 0x80]
mov eax, dword [edi]
mov dword [edx], 1
mov dword [ebx], eax
cmp dword [edx], 1
jae 0x4023bd
mov eax, dword [edi]
mov dword [edx], 1
mov dword [ebx], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret