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

Disassembly:
sub esp, 0xed8
mov eax, dword [0x4008bc0]
xor eax, esp
mov dword [esp + 0xed4], eax
mov ecx, dword [esp + 0xee4]
mov edx, dword [esp + 0xeec]
mov eax, dword [esp + 0xef4]
push esi
mov esi, dword [esp + 0xefc]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0xf04]
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0xf08]
push edi
mov edi, dword [esp + 0xee8]
mov dword [esp + 0x48], esi
xor esi, esi
test edi, 0xf0000000
mov dword [esp + 8], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x44], esi
jne 0x4012194
xor eax, eax
jmp 0x4012395
push ebx
mov ebx, edi
and ebx, 0xc0000000
cmp ebx, 0xc0000000
je 0x4012f48
cmp ecx, esi
je 0x4012f48
cmp edx, esi
jne 0x40121bd
cmp eax, esi
je 0x4012f48
test edi, 0x7fceff8
jne 0x4012f48
mov ebx, dword [esp + 0xef4]
cmp ebx, esi
jge 0x40121e2
call fcn.04013470
mov ebx, eax
mov dword [esp + 0xef4], ebx
push ebp
mov ebp, dword [esp + 0xf00]
cmp ebp, esi
jge 0x4012200
mov ecx, dword [esp + 0x2c]
call fcn.04013470
mov ebp, eax
mov dword [esp + 0xf00], ebp
cmp edi, esi
jne 0x401222e
mov ecx, dword [esp + 0x10]
call fcn.04013470
cmp eax, ebx
jge 0x401221a
mov ebx, eax
mov dword [esp + 0xef8], ebx
mov ecx, dword [esp + 0x2c]
call fcn.04013470
cmp eax, ebp
jge 0x401222e
mov dword [esp + 0xf00], eax
mov eax, edi
shr eax, 0x10
and eax, 3
mov ecx, edi
and ecx, 3
lea edx, [ecx + eax*4]
mov eax, dword [edx*4 + 0x4098678]
mov ecx, dword [esp + 0xeec]
mov edx, edi
mov dword [esp + 0x28], eax
call fcn.040104a0
cmp eax, esi
mov dword [esp + 0x54], eax
je 0x4012391
mov eax, edi
and eax, 0x80000000
mov dword [esp + 0x6c], eax
je 0x4012371
mov ecx, dword [esp + 0x10]
mov ebp, dword [sym.imp.msvcr80.dll_wcsrchr]
push 0x26
push ecx
call ebp
add esp, 8
test eax, eax
jne 0x40122a2
mov edx, dword [esp + 0x10]
push 0x7c
push edx
call ebp
add esp, 8
test eax, eax
jne 0x40122a2
mov dword [esp + 0x24], 1
mov eax, dword [esp + 0x24]
lea ebp, [eax + ebx*2]
add ebp, ebx
lea ecx, [ebp + ebp*4]
add ecx, ecx
add ecx, ecx
call fcn.040106c0
cmp eax, esi
mov dword [esp + 0x60], eax
je 0x4012391
lea ebx, [eax + 0xc]
lea edx, [ebx + ebp*4]
mov dword [esp + 0x20], edx
lea edx, [edx + ebp*4]
lea eax, [edx + ebp*4]
lea ecx, [eax + ebp*4]
mov ebp, dword [esp + 0x24]
cmp ebp, esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
jle 0x401248a
mov ecx, edi
and ecx, 0x30000000
neg ecx
sbb ecx, ecx
neg ecx
lea eax, [esp + 0x78]
mov dword [esp + 0x14], ebp
jmp 0x4012310
mov bp, word [esp + 0xf0c]
mov word [eax + 0xc], bp
mov ebp, dword [esp + 0x28]
mov dword [eax + 0x14], ebp
mov ebp, dword [esp + 0x10]
mov dword [eax + 0x20], ebp
mov ebp, dword [esp + 0xef8]
mov dword [eax + 0x24], ebp
mov ebp, dword [esp + 0x20]
mov dword [eax - 4], esi
mov dword [eax], esi
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov dword [eax + 0x10], edi
mov dword [eax + 0x18], esi
mov dword [eax + 0x28], esi
mov dword [eax + 0x4c], esi
mov dword [eax + 0x54], ebx
mov dword [eax + 0x58], ebp
mov dword [esp + 0x148], esi
mov dword [eax + 0x5c], esi
mov dword [eax + 0x64], esi
add eax, 0x70
sub dword [esp + 0x14], 1
jne 0x4012310
jmp 0x401248a
mov ebp, dword [esp + 0xef8]
lea ebp, [ebp + ebp*2 + 1]
lea ecx, [ebp + ebp*4]
add ecx, ecx
add ecx, ecx
call fcn.040106c0
cmp eax, esi
mov dword [esp + 0x60], eax
jne 0x40123ae
xor eax, eax
pop ebp
pop ebx
mov ecx, dword [esp + 0xedc]
pop edi
pop esi
xor ecx, esp
call fcn.04015245
add esp, 0xed8
ret 0x2c
lea ebx, [eax + 0xc]
lea eax, [ebx + ebp*4]
lea edx, [eax + ebp*4]
lea ecx, [edx + ebp*4]
mov dword [esp + 0x34], ecx
lea ecx, [ecx + ebp*4]
mov dword [esp + 0x38], ecx
mov ecx, edi
and ecx, 0x30000000
neg ecx
sbb ecx, ecx
neg ecx
test edi, 0x40000000
mov dword [esp + 0xf0], ecx
mov cx, word [esp + 0xf0c]
mov word [esp + 0xf4], cx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xfc], ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x108], ecx
mov ecx, dword [esp + 0xef8]
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], 1
mov dword [esp + 0xe4], esi
mov dword [esp + 0xe8], esi
mov dword [esp + 0xec], esi
mov dword [esp + 0xf8], edi
mov dword [esp + 0x100], esi
mov dword [esp + 0x10c], ecx
mov dword [esp + 0x110], esi
mov dword [esp + 0x134], esi
mov dword [esp + 0x13c], ebx
mov dword [esp + 0x140], eax
mov dword [esp + 0x148], esi
mov dword [esp + 0x144], esi
je 0x4012483
mov dword [esp + 0x14c], ebx
mov dword [esp + 0x150], edx
jmp 0x401248a
mov dword [esp + 0x14c], esi
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x48]
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x90], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xf00]
mov dword [esp + 0x98], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x80], esi
mov word [esp + 0x84], si
mov dword [esp + 0x88], edi
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], esi
mov dword [esp + 0xc4], esi
mov dword [esp + 0xcc], edx
mov dword [esp + 0xd0], ecx
mov dword [esp + 0xd8], esi
mov dword [esp + 0xd4], esi
mov dword [esp + 0xdc], esi
jmp 0x4012530
mov esi, dword [esp + 0xd8]
jmp 0x4012530
mov ecx, dword [esp + 0x9c]
test ecx, ecx
jne 0x4012548
cmp dword [esp + 0xc4], ecx
je 0x40125c6
mov eax, dword [esp + 0xd4]
cmp eax, esi
jne 0x40125d5
cmp dword [esp + 0x6c], 0
je 0x4012568
lea edx, [ebp + esi*4]
mov dword [esp + 0x3c], edx
jmp 0x40125c6
mov edx, dword [esp + 0xf00]
sub edx, dword [esp + 0xc4]
push 1
sub edx, ecx
mov ecx, dword [esp + 0x3c]
mov dword [ecx + eax*4], edx
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x58]
push edx
lea edx, [esp + 0x7c]
mov dword [esp + 0xd0], 0
call fcn.04011830
cmp dword [esp + 0x9c], 0
mov esi, dword [esp + 0xd8]
lea eax, [ebp + esi*4]
mov dword [esp + 0x3c], eax
jne 0x40125c1
cmp dword [esp + 0xc4], 0
je 0x40125c6
add dword [esp + 0x3c], 4
mov eax, dword [esp + 0xd4]
cmp eax, esi
je 0x4012e07
lea esi, [ebp + eax*4]
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x48], 0
mov dword [esp + 0x28], eax
je 0x4012e07
jmp 0x4012600
mov edi, dword [esp + 0x28]
imul edi, edi, 0x70
cmp dword [esp + edi + 0x7c], 2
mov dword [esp + 0x64], edi
jg 0x4012d21
jmp 0x4012620
mov ecx, dword [esp + edi + 0xd4]
cmp ecx, dword [esp + edi + 0xd8]
jne 0x401265c
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x54]
push 1
push edx
lea edx, [esp + edi + 0x7c]
call fcn.04011830
test eax, eax
je 0x401268a
mov eax, dword [esp + edi + 0xd4]
cmp eax, dword [esp + edi + 0xd8]
je 0x401290e
cmp dword [esp + edi + 0x7c], 2
jge 0x401296c
mov ecx, dword [esp + edi + 0xd4]
lea eax, [ebx + ecx*4]
movzx ecx, word [eax]
add ecx, 0xffff0004
cmp ecx, 3
ja case.default.0x4012683
jmp dword [ecx*4 + 0x4012f50]
mov dword [esp + edi + 0x7c], 1
jmp 0x4012667
mov ecx, dword [esp + edi + 0xc4]
add eax, 4
add ecx, dword [esp + edi + 0x9c]
mov dword [esp + edi + 0xdc], eax
mov edx, dword [esp + 0xd4]
lea eax, [ebp + edx*4]
mov dword [esp + edi + 0xe0], eax
jne 0x40126d3
mov edx, dword [esp + edi + 0xd8]
sub edx, 1
cmp dword [esp + edi + 0xd4], edx
je 0x40126eb
add dword [esp + edi + 0xd4], 1
cmp dword [esp + edi + 0x7c], 2
jle 0x4012620
jmp 0x4012d21
cmp dword [esp + 0x5c], 0
mov dword [esp + edi + 0x7c], 4
je 0x401291c
mov eax, dword [esp + 0x50]
test eax, eax
je 0x401291c
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0xd4]
mov ecx, dword [ecx + edx*4]
sub ecx, dword [esp + 0x4c]
mov dword [esp + 0x50], 0
mov dword [eax], ecx
jmp 0x401291c
mov esi, dword [esp + edi + 0xd8]
mov ecx, 1
add dword [esp + edi + 0xd4], ecx
mov eax, dword [esp + edi + 0xd4]
cmp eax, esi
mov dword [esp + 0x10], 0
mov dword [esp + 0x30], 0
jge 0x401276e
cmp word [ebx + eax*4], 0xfff9
jne 0x401276e
add eax, ecx
mov dword [esp + 0x30], ecx
mov dword [esp + edi + 0xd4], eax
cmp dword [esp + edi + 0xd4], esi
jge 0x401289b
jmp 0x4012780
mov eax, dword [esp + edi + 0xd4]
cmp word [ebx + eax*4], 0xfffb
je 0x4012879
lea ecx, [eax + 2]
cmp ecx, esi
mov dword [esp + 0x14], ecx
jge 0x4012826
cmp word [ebx + eax*4 + 4], 0xfffa
jne 0x4012826
mov ecx, dword [esp + 0xd4]
mov edx, dword [esp + 0x34]
mov esi, dword [edx + ecx*4]
mov edx, dword [esp + 0x18]
mov ebp, dword [edx + ecx*4]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + eax*4]
mov eax, dword [ebx + eax*4]
mov ecx, dword [esp + 0xef0]
push edx
push eax
push esi
mov edx, ebp
call fcn.04012080
test eax, eax
jl 0x401280e
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov edx, dword [ecx + eax*4]
mov eax, dword [ebx + eax*4]
mov ecx, dword [esp + 0xef0]
push edx
push eax
push esi
mov edx, ebp
call fcn.04012080
test eax, eax
jg 0x401280e
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + edi + 0xd8]
mov ebp, dword [esp + 0x18]
mov dword [esp + edi + 0xd4], ecx
jmp 0x401285d
mov edx, dword [esp + 0x20]
mov edx, dword [edx + eax*4]
mov eax, dword [ebx + eax*4]
mov ecx, dword [esp + 0xd4]
push edx
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [edx + ecx*4]
mov edx, dword [ebp + ecx*4]
mov ecx, dword [esp + 0xef8]
push eax
call fcn.04012080
test eax, eax
jne 0x401285d
mov dword [esp + 0x10], 1
add dword [esp + edi + 0xd4], 1
mov ecx, dword [esp + edi + 0xd4]
cmp ecx, dword [esp + edi + 0xd8]
jl 0x4012780
cmp dword [esp + 0x10], 0
je 0x401289b
cmp dword [esp + 0x30], 0
jne 0x40128a2
mov edx, dword [esp + 0xd4]
mov eax, dword [ebp + edx*4]
mov dword [esp + 0x1c], eax
jmp 0x401291c
cmp dword [esp + 0x30], 0
jne case.0x4012683.65534
mov dword [esp + edi + 0x7c], 3
jmp 0x401291c
mov eax, dword [esp + 0xd4]
cmp byte [ebp + eax*4 + 1], 0xc
jne 0x401290e
cmp byte [ebp + eax*4 + 2], 2
jne 0x401290e
cmp byte [ebp + eax*4 + 3], 2
jne 0x401290e
mov ecx, dword [ebp + eax*4]
mov dword [esp + 0x1c], ecx
jmp 0x401291c
mov eax, dword [esp + edi + 0xd4]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0xd4]
mov esi, dword [ebp + ecx*4]
add eax, eax
add eax, eax
mov edx, dword [eax + edx]
mov eax, dword [eax + ebx]
push edx
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [edx + ecx*4]
mov ecx, dword [esp + 0xef8]
push eax
mov edx, esi
call fcn.04012080
test eax, eax
je 0x4012918
mov dword [esp + edi + 0x7c], 3
jmp 0x401291c
mov dword [esp + 0x1c], esi
cmp dword [esp + edi + 0x7c], 2
jge 0x401296c
mov ecx, dword [esp + edi + 0xc4]
add ecx, dword [esp + edi + 0x9c]
jne 0x401296c
mov edx, dword [esp + edi + 0xd8]
sub edx, 1
cmp dword [esp + edi + 0xd4], edx
jne 0x401296c
mov eax, dword [esp + 0xd4]
lea ecx, [ebp + eax*4 + 4]
cmp dword [esp + 0x3c], ecx
je 0x4012964
test dword [esp + 0xef0], 0x40000000
je 0x401296c
mov dword [esp + edi + 0x7c], 4
mov ecx, dword [esp + edi + 0x7c]
cmp ecx, 3
jne 0x4012ca9
mov eax, dword [esp + edi + 0xdc]
test eax, eax
je 0x4012ca9
mov ebp, dword [esp + edi + 0xe0]
lea ecx, [ebp + 4]
sub eax, ebx
sar eax, 2
mov dword [esp + 0x40], ecx
mov dword [esp + edi + 0xe0], ecx
xor ecx, ecx
cmp eax, 1
mov dword [esp + edi + 0x7c], ecx
mov dword [esp + 0x70], eax
mov dword [esp + edi + 0xd4], eax
jg 0x40129c0
mov dword [esp + 0x44], ecx
lea esp, [esp]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0xd4]
lea ecx, [edx + eax*4]
mov edx, ebp
add ebp, 4
cmp ecx, edx
mov dword [esp + 0x14], ebp
jbe 0x4012cd6
mov ecx, dword [esp + 0x34]
mov eax, ebp
sub eax, dword [esp + 0x18]
sar eax, 2
lea edx, [ecx + eax*4]
mov eax, dword [esp + edi + 0x7c]
cmp eax, 2
mov dword [esp + 0x10], edx
mov dword [esp + 0x68], eax
jge 0x4012c9c
jmp 0x4012a10
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0xd4]
lea esi, [eax + ecx*4]
cmp ebp, esi
ja 0x4012c9c
mov eax, dword [esp + edi + 0xd4]
movzx ecx, word [ebx + eax*4]
sub ecx, 0xfffc
je 0x4012ab1
sub ecx, 1
je 0x4012a88
sub ecx, 1
je 0x4012a81
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + eax*4]
mov edx, dword [ebx + eax*4]
mov eax, dword [esp + 0x10]
push ecx
mov ecx, dword [eax]
push edx
mov edx, dword [ebp]
push ecx
mov ecx, dword [esp + 0xefc]
call fcn.04012080
test eax, eax
je 0x4012a76
mov dword [esp + edi + 0x7c], 3
jmp 0x4012c0f
mov edx, dword [esi]
mov dword [esp + 0x1c], edx
jmp 0x4012bc7
mov eax, dword [esi]
jmp 0x4012bc3
cmp byte [ebp + 1], 0xc
jne 0x4012c6b
cmp byte [ebp + 2], 2
jne 0x4012c6b
cmp byte [ebp + 3], 2
jne 0x4012c6b
mov ecx, dword [esi]
mov dword [esp + 0x1c], ecx
jmp 0x4012bc7
xor ecx, ecx
lea esi, [eax + 1]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x58], ecx
mov dword [esp + edi + 0xd4], esi
cmp word [ebx + esi*4], 0xfff9
jne 0x4012ada
mov dword [esp + 0x58], 1
jmp 0x4012b7b
cmp word [ebx + esi*4 + 4], 0xfffa
jne 0x4012b4d
mov edx, dword [esp + 0x10]
mov edi, dword [edx]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + esi*4]
mov eax, dword [esp + 0x14]
mov ebp, dword [eax]
mov eax, dword [ebx + esi*4]
mov ecx, dword [esp + 0xef0]
push edx
push eax
push edi
mov edx, ebp
call fcn.04012080
test eax, eax
jl 0x4012b37
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + esi*4 + 8]
mov eax, dword [ebx + esi*4 + 8]
mov ecx, dword [esp + 0xef0]
push edx
push eax
push edi
mov edx, ebp
call fcn.04012080
test eax, eax
jg 0x4012b37
mov dword [esp + 0x30], 1
mov ecx, dword [esp + 0x64]
mov ebp, dword [esp + 0x14]
add esi, 2
mov dword [esp + ecx + 0xd4], esi
mov edi, ecx
jmp 0x4012b7b
mov edx, dword [esp + 0x20]
mov eax, dword [edx + esi*4]
mov ecx, dword [ebx + esi*4]
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [edx]
mov edx, dword [ebp]
push ecx
mov ecx, dword [esp + 0xef8]
push eax
call fcn.04012080
test eax, eax
jne 0x4012b7b
mov dword [esp + 0x30], 1
add dword [esp + edi + 0xd4], 1
mov esi, dword [esp + edi + 0xd4]
cmp word [ebx + esi*4], 0xfffb
je 0x4012b9f
cmp esi, dword [esp + edi + 0xd8]
jl 0x4012ac5
cmp dword [esp + 0x30], 0
je 0x4012c60
cmp dword [esp + 0x58], 0
jne 0x4012c6b
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xd4]
mov eax, dword [ecx + edx*4]
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x68], 2
jge 0x4012c0f
mov ecx, dword [esp + edi + 0xc4]
add ecx, dword [esp + edi + 0x9c]
jne 0x4012c0f
mov edx, dword [esp + edi + 0xd8]
sub edx, 1
cmp dword [esp + edi + 0xd4], edx
jne 0x4012c0f
lea eax, [ebp + 4]
cmp dword [esp + 0x3c], eax
je 0x4012c07
test dword [esp + 0xef0], 0x40000000
je 0x4012c0f
mov dword [esp + edi + 0x7c], 4
mov eax, dword [esp + edi + 0x7c]
add dword [esp + 0x10], 4
add ebp, 4
cmp eax, 3
mov dword [esp + 0x14], ebp
mov dword [esp + 0x68], eax
je 0x4012c75
cmp dword [esp + 0x44], 0
jne 0x4012c49
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0xd4]
mov ecx, dword [ecx + edx*4]
mov dword [esp + 0x44], 1
mov dword [esp + 0x4c], ecx
test eax, eax
jne 0x4012c55
add dword [esp + edi + 0xd4], 1
cmp eax, 2
jl 0x4012a10
jmp 0x4012cd6
cmp dword [esp + 0x58], 0
jne 0x4012bb5
mov dword [esp + edi + 0x7c], 3
jmp 0x4012c0f
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x70]
mov ebp, eax
add eax, 4
mov dword [esp + 0x40], eax
mov dword [esp + edi + 0xe0], eax
mov dword [esp + edi + 0x7c], 0
mov dword [esp + edi + 0xd4], edx
cmp dword [esp + edi + 0x7c], 2
jl 0x40129c0
jmp 0x4012cd6
cmp dword [esp + 0x44], 0
jne 0x4012cca
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0xd4]
mov eax, dword [eax + edx*4]
mov dword [esp + 0x44], 1
mov dword [esp + 0x4c], eax
test ecx, ecx
jne 0x4012cd6
add dword [esp + edi + 0xd4], 1
mov eax, dword [esp + edi + 0x7c]
cmp eax, 4
jne 0x4012cea
mov dword [esp + edi + 0xdc], 0
cmp eax, 2
jge 0x4012cf7
mov dword [esp + 0x48], 1
cmp dword [esp + edi + 0xdc], 0
mov esi, dword [esp + 0x2c]
je 0x4012d1d
test esi, esi
je 0x4012d12
cmp dword [esp + edi + 0xe0], esi
jae 0x4012d1d
mov esi, dword [esp + edi + 0xe0]
mov dword [esp + 0x2c], esi
mov ebp, dword [esp + 0x18]
mov eax, 1
sub dword [esp + 0x28], eax
jne 0x4012600
cmp dword [esp + 0x48], 0
je 0x4012e07
add dword [esp + 0xd4], eax
lea ecx, [ebp + 4]
cmp esi, ecx
jbe 0x4012520
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
imul ebp, ebp, 0x70
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + ebp + 0xd8]
sub esi, eax
sub esi, 4
lea edi, [esp + ebp + 0xd8]
sar esi, 2
sub edx, esi
add edx, edx
lea ecx, [esi*4]
add edx, edx
mov dword [esp + 0x14], ecx
push edx
add ecx, eax
push ecx
push eax
call sub.msvcr80.dll_memcpy
mov eax, dword [edi]
mov ecx, dword [esp + 0x20]
sub eax, esi
add eax, eax
add eax, eax
push eax
mov eax, dword [esp + 0x44]
add ecx, eax
push ecx
push eax
call sub.msvcr80.dll_memcpy
add esp, 0x18
cmp dword [esp + 0x5c], 0
je 0x4012dce
mov edx, dword [edi]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
sub edx, esi
add edx, edx
add edx, edx
push edx
add ecx, eax
push ecx
push eax
call sub.msvcr80.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 0x24]
sub dword [esp + ebp + 0xd4], esi
sub dword [edi], esi
lea ebp, [esp + ebp + 0xd4]
mov edx, ecx
imul edx, edx, 0x70
lea eax, [esp + edx + 0xe0]
mov edx, dword [esp + 0x14]
sub dword [eax], edx
sub ecx, 1
sub eax, 0x70
test ecx, ecx
jne 0x4012df2
mov ebp, dword [esp + 0x18]
jmp 0x4012520
mov esi, dword [esp + 0x24]
test esi, esi
mov edi, esi
je 0x4012ebc
imul esi, esi, 0x70
mov ecx, 3
lea ecx, [ecx]
cmp dword [esp + esi + 0x7c], 0
jne 0x4012eae
mov dword [esp + esi + 0x7c], 4
cmp dword [esp + esi + 0x9c], 0
jne 0x4012e57
cmp dword [esp + esi + 0xc4], 0
jne 0x4012e57
mov eax, dword [esp + esi + 0xd4]
cmp eax, dword [esp + esi + 0xd8]
je 0x4012eae
mov edx, dword [esp + esi + 0xd4]
cmp edx, dword [esp + esi + 0xd8]
jne 0x4012e80
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x54]
push 1
push eax
lea edx, [esp + esi + 0x7c]
call fcn.04011830
mov ecx, 3
mov eax, dword [esp + esi + 0xd4]
cmp eax, dword [esp + esi + 0xd8]
je 0x4012ea8
cmp word [ebx + eax*4], 0xffff
je 0x4012e9e
mov dword [esp + esi + 0x7c], ecx
jmp 0x4012ea8
add eax, 1
mov dword [esp + esi + 0xd4], eax
cmp dword [esp + esi + 0x7c], ecx
jne 0x4012e33
sub edi, 1
sub esi, 0x70
test edi, edi
jne 0x4012e20
mov esi, dword [esp + 0x24]
mov edx, 1
cmp esi, edx
jl 0x4012eec
lea eax, [esp + 0xec]
cmp dword [eax - 8], 0
jne 0x4012ee2
mov ecx, dword [eax]
cmp ecx, 4
je 0x4012ee2
cmp ecx, 1
jne 0x4012f35
add edx, 1
add eax, 0x70
cmp edx, esi
jle 0x4012ed0
mov ecx, dword [esp + 0x5c]
test ecx, ecx
je 0x4012f22
mov eax, dword [esp + 0x4c]
mov dword [ecx], eax
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x4012f22
mov edx, dword [esp + 0xc8]
sub edx, dword [esp + 0xc4]
sub edx, dword [esp + 0x9c]
sub edx, eax
add edx, dword [esp + 0xf00]
mov dword [ecx], edx
mov ecx, dword [esp + 0x60]
call fcn.04010770
mov eax, 2
jmp 0x4012393
mov ecx, dword [esp + 0x60]
call fcn.04010770
mov eax, 3
jmp 0x4012393
xor eax, eax
jmp 0x4012394