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

Disassembly:
sub esp, 0x7c
mov eax, dword [esp + 0x80]
mov ecx, dword [eax + 8]
push ebx
push ebp
mov ebp, 1
mov edx, ebp
shl edx, cl
mov ecx, dword [eax + 4]
push esi
push edi
mov edi, dword [eax + 0xc]
mov eax, dword [eax]
sub edx, ebp
mov dword [esp + 0x4c], edx
mov edx, ebp
shl edx, cl
mov dword [esp + 0x40], eax
add ecx, eax
mov eax, 0x300
sub edx, ebp
xor ebx, ebx
shl eax, cl
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0xa0]
mov dword [esp + 0x28], edi
add eax, 0x736
mov dword [esp + 0x20], ebx
mov byte [esp + 0x13], bl
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x38], ebp
mov dword [edx], ebx
je 0x40602a
mov ecx, eax
mov eax, 0x400
rep stosd dword es:[edi], eax
xor eax, eax
xor edi, edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
or esi, 0xffffffff
lea esp, [esp]
cmp eax, dword [esp + 0x18]
jne 0x40607a
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x48]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x40609f
movzx ecx, byte [eax]
shl edi, 8
add eax, ebp
add ebx, ebp
or edi, ecx
cmp ebx, 5
mov dword [esp + 0x14], eax
jl 0x406040
cmp dword [esp + 0x9c], 0
jbe 0x4063d5
jmp 0x4060b4
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x7c
ret
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x4c]
and ecx, dword [esp + 0x20]
mov edx, ebp
shl edx, 4
add edx, ecx
cmp esi, 0x1000000
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x28]
lea ebx, [ecx + edx*4]
mov dword [esp + 0x2c], ebx
jae 0x40612e
cmp eax, dword [esp + 0x18]
jne 0x40611c
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x50]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x406405
mov edx, 0x800
sub edx, eax
shr edx, 5
add edx, eax
mov eax, dword [esp + 0x2c]
mov dword [eax], edx
movzx edx, byte [esp + 0x13]
mov eax, dword [esp + 0x54]
and eax, dword [esp + 0x20]
mov esi, ecx
mov ecx, 8
sub cl, byte [esp + 0x40]
mov ebx, 1
shr edx, cl
mov ecx, dword [esp + 0x40]
shl eax, cl
mov ecx, dword [esp + 0x28]
add edx, eax
imul edx, edx, 0xc00
cmp ebp, 7
lea edx, [edx + ecx + 0x1cd8]
mov dword [esp + 0x2c], edx
jl 0x40626a
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x98]
movzx edx, byte [eax + ecx]
mov dword [esp + 0x3c], edx
mov edi, edi
mov ebp, dword [esp + 0x3c]
mov ecx, dword [esp + 0x2c]
add ebp, ebp
mov dword [esp + 0x3c], ebp
and ebp, 0x100
cmp esi, 0x1000000
lea eax, [ebx + ebp]
lea edx, [ecx + eax*4 + 0x400]
mov dword [esp + 0x48], edx
jae 0x406232
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x40621c
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x58]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
mov edx, dword [esp + 0x48]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [edx]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x4062f4
mov esi, ecx
mov ecx, 0x800
sub ecx, eax
shr ecx, 5
add ecx, eax
add ebx, ebx
test ebp, ebp
mov dword [edx], ecx
je 0x40630d
cmp ebx, 0x100
jge 0x406339
mov edx, dword [esp + 0x2c]
mov edi, edi
cmp esi, 0x1000000
jae 0x4062d0
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x4062ba
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x5c]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
mov edx, dword [esp + 0x2c]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [edx + ebx*4]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x40631b
mov esi, ecx
mov ecx, 0x800
sub ecx, eax
shr ecx, 5
add ecx, eax
mov dword [edx + ebx*4], ecx
add ebx, ebx
jmp 0x40632d
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
test ebp, ebp
mov dword [edx], eax
lea ebx, [ebx + ebx + 1]
je 0x40625e
cmp ebx, 0x100
jl 0x4061b0
jmp 0x406339
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
mov dword [edx + ebx*4], eax
lea ebx, [ebx + ebx + 1]
cmp ebx, 0x100
jl 0x406270
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x98]
mov byte [eax + edx], bl
add eax, 1
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
cmp eax, 4
mov byte [esp + 0x13], bl
jge 0x406365
mov dword [esp + 0x24], 0
jmp 0x406375
cmp eax, 0xa
jge 0x4063fd
sub eax, 3
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x9c]
jb 0x4060b0
cmp esi, 0x1000000
mov eax, dword [esp + 0x14]
jae 0x4063d5
cmp eax, dword [esp + 0x18]
jne 0x4063d2
mov eax, dword [esp + 0x94]
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x18]
push edx
push eax
mov eax, dword [eax]
call eax
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x88]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
add eax, 1
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0xa0]
mov dword [ecx + 0x10], eax
mov eax, dword [esp + 0x18]
mov dword [ecx + 0x14], eax
mov ecx, dword [esp + 0x20]
mov dword [edx], ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
sub eax, 6
jmp 0x406371
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
cmp esi, 0x1000000
mov dword [ebx], eax
jae 0x40646a
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x406458
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x60]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x28]
mov eax, dword [edx + ebp*4 + 0x300]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x4064cf
mov ebx, dword [esp + 0x28]
mov edx, 0x800
sub edx, eax
shr edx, 5
add edx, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], eax
xor eax, eax
cmp ebp, 7
setl al
mov dword [ebx + ebp*4 + 0x300], edx
mov edx, dword [esp + 0x1c]
mov esi, ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
sub eax, 1
and eax, 3
mov dword [esp + 0x24], eax
add ebx, 0xcc8
jmp 0x4067e4
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
cmp esi, 0x1000000
mov dword [edx + ebp*4 + 0x300], eax
jae 0x40653d
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x40652b
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x64]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + ebp*4 + 0x330]
mov ebx, esi
shr ebx, 0xb
imul ebx, ecx
cmp edi, ebx
jae 0x406650
mov edx, 0x800
sub edx, ecx
shr edx, 5
add edx, ecx
lea ecx, [ebp + 0xf]
shl ecx, 4
add ecx, dword [esp + 0x3c]
cmp ebx, 0x1000000
mov dword [eax + ebp*4 + 0x330], edx
lea eax, [eax + ecx*4]
mov esi, ebx
mov dword [esp + 0x2c], eax
jae 0x4065e0
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x4065c8
lea edx, [esp + 0x68]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x68]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl ebx, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
mov esi, ebx
mov ecx, dword [eax]
mov edx, esi
shr edx, 0xb
imul edx, ecx
cmp edi, edx
jae 0x40663e
mov esi, edx
mov edx, 0x800
sub edx, ecx
shr edx, 5
add edx, ecx
mov dword [eax], edx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x406d05
mov edx, dword [esp + 0x98]
xor ecx, ecx
cmp ebp, 7
setge cl
lea ecx, [ecx + ecx + 9]
mov dword [esp + 0x24], ecx
mov ecx, eax
sub ecx, dword [esp + 0x1c]
add eax, 1
mov cl, byte [ecx + edx]
mov byte [eax + edx - 1], cl
mov byte [esp + 0x13], cl
mov dword [esp + 0x20], eax
jmp 0x406375
sub esi, edx
sub edi, edx
mov edx, ecx
shr edx, 5
sub ecx, edx
mov dword [eax], ecx
jmp 0x4067c5
mov edx, ecx
shr edx, 5
sub esi, ebx
sub ecx, edx
sub edi, ebx
cmp esi, 0x1000000
mov dword [eax + ebp*4 + 0x330], ecx
jae 0x4066c2
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x4066ac
lea eax, [esp + 0x6c]
push eax
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x6c]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + ebp*4 + 0x360]
mov edx, esi
shr edx, 0xb
imul edx, ecx
cmp edi, edx
jae 0x4066f3
mov esi, edx
mov edx, 0x800
sub edx, ecx
shr edx, 5
add edx, ecx
mov dword [eax + ebp*4 + 0x360], edx
mov eax, dword [esp + 0x34]
jmp 0x4067b9
sub esi, edx
sub edi, edx
mov edx, ecx
shr edx, 5
sub ecx, edx
cmp esi, 0x1000000
mov dword [eax + ebp*4 + 0x360], ecx
jae 0x406765
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x40674f
lea eax, [esp + 0x70]
push eax
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x70]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + ebp*4 + 0x390]
mov edx, esi
shr edx, 0xb
imul edx, ecx
cmp edi, edx
jae 0x406793
mov esi, edx
mov edx, 0x800
sub edx, ecx
shr edx, 5
add edx, ecx
mov dword [eax + ebp*4 + 0x390], edx
mov eax, dword [esp + 0x30]
jmp 0x4067b1
sub esi, edx
sub edi, edx
mov edx, ecx
shr edx, 5
sub ecx, edx
mov dword [eax + ebp*4 + 0x390], ecx
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x30], edx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x28]
xor edx, edx
cmp ebp, 7
setge dl
sub edx, 1
and edx, 0xfffffffd
add edx, 0xb
mov dword [esp + 0x24], edx
add ebx, 0x14d0
cmp esi, 0x1000000
jae 0x406840
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x40682e
lea eax, [esp + 0x74]
push eax
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x74]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x406878
mov edx, 0x800
sub edx, eax
shr edx, 5
add edx, eax
mov eax, dword [esp + 0x3c]
shl eax, 5
mov dword [ebx], edx
mov esi, ecx
lea ebx, [eax + ebx + 8]
xor edx, edx
mov dword [esp + 0x2c], 3
jmp 0x40693f
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
cmp esi, 0x1000000
mov dword [ebx], eax
jae 0x4068e1
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x4068cf
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x78]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 4]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x40691e
mov edx, 0x800
sub edx, eax
shr edx, 5
add edx, eax
mov eax, dword [esp + 0x3c]
mov dword [ebx + 4], edx
shl eax, 5
mov esi, ecx
lea ebx, [eax + ebx + 0x208]
mov edx, 8
mov dword [esp + 0x2c], 3
jmp 0x40693f
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
mov dword [ebx + 4], eax
add ebx, 0x408
mov edx, 0x10
mov dword [esp + 0x2c], 8
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x44], eax
mov ebp, 1
cmp esi, 0x1000000
jae 0x4069b0
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x40699a
mov eax, dword [esp + 0x94]
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x18]
push edx
push eax
mov eax, dword [eax]
call eax
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x7c]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
mov edx, dword [esp + 0x3c]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx + ebp*4]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x4069d4
mov esi, ecx
mov ecx, 0x800
sub ecx, eax
shr ecx, 5
add ecx, eax
mov dword [ebx + ebp*4], ecx
add ebp, ebp
jmp 0x4069e6
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
mov dword [ebx + ebp*4], eax
lea ebp, [ebp + ebp + 1]
sub dword [esp + 0x44], 1
jne 0x406950
mov ecx, dword [esp + 0x2c]
mov eax, 1
shl eax, cl
sub edx, eax
add ebp, edx
cmp dword [esp + 0x24], 4
mov dword [esp + 0x48], ebp
jge 0x406cb3
add dword [esp + 0x24], 7
cmp ebp, 4
jl 0x406a1e
mov ebp, 3
mov ecx, dword [esp + 0x28]
shl ebp, 8
lea ebp, [ecx + ebp + 0x6c0]
mov dword [esp + 0x44], 6
mov ebx, 1
lea esp, [esp]
cmp esi, 0x1000000
jae 0x406aa2
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x406a90
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax]
push eax
call ecx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x80]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebp + ebx*4]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x406ac8
mov edx, 0x800
sub edx, eax
shr edx, 5
add edx, eax
mov dword [ebp + ebx*4], edx
mov esi, ecx
add ebx, ebx
jmp 0x406adb
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
mov dword [ebp + ebx*4], eax
lea ebx, [ebx + ebx + 1]
sub dword [esp + 0x44], 1
jne 0x406a40
sub ebx, 0x40
cmp ebx, 4
jl 0x406ca4
mov ecx, ebx
mov ebp, ebx
sar ecx, 1
and ebp, 1
sub ecx, 1
or ebp, 2
cmp ebx, 0xe
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x1c], ebp
jge 0x406b39
mov edx, dword [esp + 0x28]
mov eax, ebp
shl eax, cl
mov dword [esp + 0x3c], 1
mov dword [esp + 0x1c], eax
sub eax, ebx
lea ebp, [edx + eax*4 + 0xabc]
mov eax, dword [esp + 0x14]
mov ebx, 1
jmp 0x406bf4
mov eax, dword [esp + 0x14]
sub ecx, 4
mov dword [esp + 0x2c], ecx
cmp esi, 0x1000000
jae 0x406ba6
cmp eax, dword [esp + 0x18]
jne 0x406b94
lea eax, [esp + 0x84]
push eax
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x84]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
mov ecx, dword [esp + 0x2c]
movzx edx, byte [eax]
shl edi, 8
shl esi, 8
or edi, edx
add eax, 1
mov dword [esp + 0x14], eax
shr esi, 1
add ebp, ebp
cmp edi, esi
mov dword [esp + 0x1c], ebp
jb 0x406bbb
sub edi, esi
or ebp, 1
mov dword [esp + 0x1c], ebp
sub ecx, 1
mov dword [esp + 0x2c], ecx
jne 0x406b44
mov ebp, dword [esp + 0x28]
add ebp, 0xc88
shl dword [esp + 0x1c], 4
mov dword [esp + 0x2c], 4
mov dword [esp + 0x3c], 1
mov ebx, 1
jmp 0x406bf4
mov eax, dword [esp + 0x14]
cmp esi, 0x1000000
jae 0x406c52
cmp eax, dword [esp + 0x18]
jne 0x406c40
lea eax, [esp + 0x88]
push eax
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
jne 0x4063f5
mov ecx, dword [esp + 0x88]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406d05
movzx ecx, byte [eax]
shl edi, 8
shl esi, 8
or edi, ecx
add eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebp + ebx*4]
mov ecx, esi
shr ecx, 0xb
imul ecx, eax
cmp edi, ecx
jae 0x406c78
mov edx, 0x800
sub edx, eax
shr edx, 5
add edx, eax
mov dword [ebp + ebx*4], edx
mov esi, ecx
add ebx, ebx
jmp 0x406c93
mov edx, dword [esp + 0x3c]
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
or dword [esp + 0x1c], edx
mov dword [ebp + ebx*4], eax
lea ebx, [ebx + ebx + 1]
shl dword [esp + 0x3c], 1
sub dword [esp + 0x2c], 1
jne 0x406bf0
jmp 0x406ca8
mov dword [esp + 0x1c], ebx
add dword [esp + 0x1c], 1
je 0x406386
mov ebx, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add ebx, 2
cmp edx, ecx
ja 0x406d05
mov eax, ecx
sub eax, edx
add eax, dword [esp + 0x98]
mov dl, byte [eax]
mov ebp, dword [esp + 0x98]
sub ebx, 1
mov byte [ecx + ebp], dl
add ecx, 1
add eax, 1
test ebx, ebx
mov byte [esp + 0x13], dl
mov dword [esp + 0x20], ecx
je 0x406375
cmp ecx, dword [esp + 0x9c]
jae 0x406386
jmp 0x406cd1
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x7c
ret