Function at 0x405500
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 0x40557a
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 0x4055ca
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 0x405945
mov ecx, dword [esp + 0x48]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x4055ef
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 0x405590
cmp dword [esp + 0x9c], 0
jbe 0x405925
jmp 0x405604
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 0x40567e
cmp eax, dword [esp + 0x18]
jne 0x40566c
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 0x405945
mov ecx, dword [esp + 0x50]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405955
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 0x4057ba
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 0x405782
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x40576c
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 0x405945
mov ecx, dword [esp + 0x58]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405844
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 0x40585d
cmp ebx, 0x100
jge 0x405889
mov edx, dword [esp + 0x2c]
mov edi, edi
cmp esi, 0x1000000
jae 0x405820
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x40580a
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 0x405945
mov ecx, dword [esp + 0x5c]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x40586b
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 0x40587d
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 0x4057ae
cmp ebx, 0x100
jl 0x405700
jmp 0x405889
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 0x4057c0
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 0x4058b5
mov dword [esp + 0x24], 0
jmp 0x4058c5
cmp eax, 0xa
jge 0x40594d
sub eax, 3
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x9c]
jb 0x405600
cmp esi, 0x1000000
mov eax, dword [esp + 0x14]
jae 0x405925
cmp eax, dword [esp + 0x18]
jne 0x405922
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 0x405945
mov ecx, dword [esp + 0x88]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x4058c1
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
cmp esi, 0x1000000
mov dword [ebx], eax
jae 0x4059ba
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x4059a8
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 0x405945
mov ecx, dword [esp + 0x60]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405a1f
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 0x405d34
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 0x405a8d
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405a7b
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 0x405945
mov ecx, dword [esp + 0x64]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405ba0
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 0x405b30
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405b18
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 0x405945
mov ecx, dword [esp + 0x68]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405b8e
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 0x406255
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 0x4058c5
sub esi, edx
sub edi, edx
mov edx, ecx
shr edx, 5
sub ecx, edx
mov dword [eax], ecx
jmp 0x405d15
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 0x405c12
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405bfc
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 0x405945
mov ecx, dword [esp + 0x6c]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405c43
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 0x405d09
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 0x405cb5
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405c9f
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 0x405945
mov ecx, dword [esp + 0x70]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405ce3
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 0x405d01
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 0x405d90
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405d7e
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 0x405945
mov ecx, dword [esp + 0x74]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405dc8
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 0x405e8f
sub esi, ecx
sub edi, ecx
mov ecx, eax
shr ecx, 5
sub eax, ecx
cmp esi, 0x1000000
mov dword [ebx], eax
jae 0x405e31
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405e1f
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 0x405945
mov ecx, dword [esp + 0x78]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405e6e
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 0x405e8f
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 0x405f00
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405eea
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 0x405945
mov ecx, dword [esp + 0x7c]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x405f24
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 0x405f36
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 0x405ea0
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 0x406203
add dword [esp + 0x24], 7
cmp ebp, 4
jl 0x405f6e
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 0x405ff2
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x405fe0
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 0x405945
mov ecx, dword [esp + 0x80]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x406018
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 0x40602b
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 0x405f90
sub ebx, 0x40
cmp ebx, 4
jl 0x4061f4
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 0x406089
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 0x406144
mov eax, dword [esp + 0x14]
sub ecx, 4
mov dword [esp + 0x2c], ecx
cmp esi, 0x1000000
jae 0x4060f6
cmp eax, dword [esp + 0x18]
jne 0x4060e4
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 0x405945
mov ecx, dword [esp + 0x84]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x40610b
sub edi, esi
or ebp, 1
mov dword [esp + 0x1c], ebp
sub ecx, 1
mov dword [esp + 0x2c], ecx
jne 0x406094
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 0x406144
mov eax, dword [esp + 0x14]
cmp esi, 0x1000000
jae 0x4061a2
cmp eax, dword [esp + 0x18]
jne 0x406190
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 0x405945
mov ecx, dword [esp + 0x88]
test ecx, ecx
mov eax, dword [esp + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x18], edx
je 0x406255
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 0x4061c8
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 0x4061e3
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 0x406140
jmp 0x4061f8
mov dword [esp + 0x1c], ebx
add dword [esp + 0x1c], 1
je 0x4058d6
mov ebx, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add ebx, 2
cmp edx, ecx
ja 0x406255
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 0x4058c5
cmp ecx, dword [esp + 0x9c]
jae 0x4058d6
jmp 0x406221
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x7c
ret