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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x88
push ebx
mov ebx, dword [ebp + 0xc]
push edi
cmp ebx, 0xa
jae 0x4058e1
mov eax, 0xffffffec
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
movzx edi, word [eax]
add edx, ecx
mov dword [esp + 0x14], edx
movzx edx, word [eax + 2]
add eax, 6
mov dword [esp + 0x70], edx
movzx edx, word [eax - 2]
sub ebx, edx
mov dword [esp + 0x8c], eax
add eax, edi
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x10], eax
add eax, edx
mov dword [esp + 0x74], eax
mov eax, dword [ebp + 8]
sub ebx, edx
add eax, 3
shr eax, 2
lea edx, [eax + ecx]
mov dword [esp + 0x28], edx
add edx, eax
add eax, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], edx
mov edx, dword [esi]
shr edx, 0x10
sub ebx, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x68], eax
movzx eax, dl
sub ebx, 6
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x20], ecx
mov dword [esp + 0xc], eax
cmp ebx, dword [ebp + 0xc]
ja 0x4058d6
mov edx, dword [esp + 0x8c]
lea ecx, [esp + 0x2c]
call fcn.004044f0
cmp eax, 0xffffff88
ja 0x4063cd
mov edi, dword [esp + 0x70]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x54]
call fcn.004044f0
cmp eax, 0xffffff88
ja 0x4063cd
mov edi, dword [esp + 0x6c]
mov edx, dword [esp + 0x74]
lea ecx, [esp + 0x40]
call fcn.004044f0
cmp eax, 0xffffff88
ja 0x4063cd
mov edx, edi
add edx, dword [esp + 0x74]
mov edi, ebx
lea ecx, [esp + 0x78]
call fcn.004044f0
cmp eax, 0xffffff88
ja 0x4063cd
mov eax, dword [esp + 0x14]
add eax, 0xfffffffd
cmp dword [esp + 0x18], eax
sbb eax, eax
neg eax
test al, 1
je 0x405c71
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 0x7c]
neg eax
and eax, 0x1f
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
and ecx, 0x1f
shl edx, cl
mov ebx, dword [esp + 8]
mov ecx, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [ebx], cx
movzx ecx, byte [esi + edx*4 + 6]
add dword [esp + 0x30], ecx
movzx edx, byte [esi + edx*4 + 7]
add dword [esp + 8], edx
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
and ecx, 0x1f
shl edx, cl
mov ebx, dword [esp + 0x20]
mov ecx, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [ebx], cx
movzx ecx, byte [esi + edx*4 + 6]
add dword [esp + 0x58], ecx
movzx edx, byte [esi + edx*4 + 7]
add dword [esp + 0x20], edx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
and ecx, 0x1f
shl edx, cl
mov ebx, dword [esp + 0x1c]
mov ecx, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [ebx], cx
movzx ecx, byte [esi + edx*4 + 6]
movzx edx, byte [esi + edx*4 + 7]
add dword [esp + 0x44], ecx
add dword [esp + 0x1c], edx
mov edx, dword [esp + 0x78]
mov ecx, edi
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
mov ecx, dword [esp + 0x68]
movzx ebx, word [esi + edx*4 + 4]
mov word [ecx], bx
movzx ebx, byte [esi + edx*4 + 6]
movzx edx, byte [esi + edx*4 + 7]
add ecx, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x30]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
add edi, ebx
mov ebx, dword [esp + 8]
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [ebx], cx
movzx ecx, byte [esi + edx*4 + 6]
movzx edx, byte [esi + edx*4 + 7]
add dword [esp + 0x30], ecx
add dword [esp + 8], edx
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x20]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [ebx], cx
movzx ecx, byte [esi + edx*4 + 6]
movzx edx, byte [esi + edx*4 + 7]
add dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x44]
add dword [esp + 0x20], edx
and ecx, 0x1f
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x1c]
shl edx, cl
mov ecx, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [ebx], cx
movzx ecx, byte [esi + edx*4 + 6]
movzx edx, byte [esi + edx*4 + 7]
add dword [esp + 0x44], ecx
add dword [esp + 0x1c], edx
mov edx, dword [esp + 0x78]
mov ecx, edi
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
mov ecx, dword [esp + 0x68]
movzx ebx, word [esi + edx*4 + 4]
mov word [ecx], bx
movzx ebx, byte [esi + edx*4 + 6]
movzx edx, byte [esi + edx*4 + 7]
add ecx, edx
mov edx, dword [esp + 0x34]
add edi, ebx
mov dword [esp + 0x68], ecx
cmp edx, dword [esp + 0x3c]
jae 0x405b78
mov dword [esp + 0x70], 3
jmp 0x405b98
mov ebx, dword [esp + 0x30]
shr ebx, 3
sub edx, ebx
and dword [esp + 0x30], 7
mov dword [esp + 0x34], edx
mov edx, dword [edx]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x70], 0
mov edx, dword [esp + 0x5c]
cmp edx, dword [esp + 0x64]
jae 0x405bac
mov dword [esp + 0x74], 3
jmp 0x405bcc
mov ebx, dword [esp + 0x58]
shr ebx, 3
sub edx, ebx
and dword [esp + 0x58], 7
mov dword [esp + 0x5c], edx
mov edx, dword [edx]
mov dword [esp + 0x54], edx
mov dword [esp + 0x74], 0
mov edx, dword [esp + 0x48]
cmp edx, dword [esp + 0x50]
jae 0x405be0
mov dword [esp + 0x6c], 3
jmp 0x405c00
mov ebx, dword [esp + 0x44]
shr ebx, 3
sub edx, ebx
and dword [esp + 0x44], 7
mov dword [esp + 0x48], edx
mov edx, dword [edx]
mov dword [esp + 0x40], edx
mov dword [esp + 0x6c], 0
mov edx, dword [esp + 0x80]
cmp edx, dword [esp + 0x88]
jae 0x405c17
mov edx, 3
jmp 0x405c30
mov ebx, edi
shr ebx, 3
sub edx, ebx
mov dword [esp + 0x80], edx
mov edx, dword [edx]
and edi, 7
mov dword [esp + 0x78], edx
xor edx, edx
mov ebx, dword [esp + 0x14]
add ebx, 0xfffffffd
cmp ecx, ebx
sbb ecx, ecx
neg ecx
xor ebx, ebx
test edx, edx
sete bl
xor edx, edx
and ecx, ebx
cmp dword [esp + 0x6c], edx
sete dl
and ecx, edx
xor edx, edx
cmp dword [esp + 0x74], edx
sete dl
and ecx, edx
xor edx, edx
cmp dword [esp + 0x70], edx
sete dl
test edx, ecx
jne 0x4059f0
mov dword [esp + 0x7c], edi
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0x28]
cmp edi, ebx
ja 0x4058d6
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x24]
ja 0x4058d6
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x1c], ecx
ja 0x4058d6
lea ecx, [esp + 0x2c]
add ebx, 0xfffffffd
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp edi, ebx
sbb edx, edx
neg edx
test edx, eax
je 0x405d3c
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
mov ebx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov ecx, ebx
and ecx, 0x1f
mov eax, edx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
movzx ecx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add ebx, ecx
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 8]
add edi, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + edx*4 + 7]
movzx eax, byte [esi + edx*4 + 6]
add ebx, eax
add edi, ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], ebx
call fcn.00404640
neg eax
sbb edx, edx
mov eax, dword [esp + 0x28]
add eax, 0xfffffffd
inc edx
cmp edi, eax
sbb eax, eax
neg eax
test eax, edx
jne 0x405cc9
mov ebx, dword [esp + 0x28]
add ebx, 0xfffffffe
lea ecx, [esp + 0x2c]
mov dword [esp + 0x10], ebx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp ebx, edi
sbb ecx, ecx
inc ecx
test ecx, eax
je 0x405dad
mov ebx, dword [esp + 0xc]
neg ebx
and ebx, 0x1f
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ecx, edx
and ecx, 0x1f
shl eax, cl
mov ecx, ebx
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
add edx, ecx
mov dword [esp + 0x30], edx
movzx edx, byte [esi + eax*4 + 7]
lea ecx, [esp + 0x2c]
add edi, edx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp dword [esp + 0x10], edi
sbb ecx, ecx
inc ecx
test ecx, eax
jne 0x405d67
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
add eax, 0xfffffffe
cmp edi, eax
ja 0x405e04
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
lea ecx, [ecx]
mov ecx, edx
and ecx, 0x1f
mov eax, ebx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add edi, eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffffe
add edx, ecx
cmp edi, eax
jbe 0x405dd0
mov dword [esp + 0x30], edx
cmp edi, dword [esp + 0x28]
jae 0x405e53
mov ecx, edx
and ecx, 0x1f
shl ebx, cl
mov ecx, dword [esp + 0xc]
neg ecx
and ecx, 0x1f
shr ebx, cl
mov cl, byte [esi + ebx*4 + 4]
mov byte [edi], cl
cmp byte [esi + ebx*4 + 7], 1
jne 0x405e36
movzx eax, byte [esi + ebx*4 + 6]
add edx, eax
mov dword [esp + 0x30], edx
jmp 0x405e53
cmp edx, 0x20
jae 0x405e53
movzx ecx, byte [esi + ebx*4 + 6]
add edx, ecx
mov dword [esp + 0x30], edx
cmp edx, 0x20
jbe 0x405e53
mov dword [esp + 0x30], 0x20
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x54]
add ebx, 0xfffffffd
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp edi, ebx
sbb edx, edx
neg edx
test edx, eax
je 0x405f03
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
jmp 0x405e90
mov ebx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov ecx, ebx
and ecx, 0x1f
mov eax, edx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
movzx ecx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add ebx, ecx
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 8]
add edi, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + edx*4 + 7]
movzx eax, byte [esi + edx*4 + 6]
add ebx, eax
add edi, ecx
lea ecx, [esp + 0x54]
mov dword [esp + 0x58], ebx
call fcn.00404640
neg eax
sbb edx, edx
mov eax, dword [esp + 0x24]
add eax, 0xfffffffd
inc edx
cmp edi, eax
sbb eax, eax
neg eax
test eax, edx
jne 0x405e90
mov ebx, dword [esp + 0x24]
add ebx, 0xfffffffe
lea ecx, [esp + 0x54]
mov dword [esp + 0x10], ebx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp ebx, edi
sbb ecx, ecx
inc ecx
test ecx, eax
je 0x405f74
mov ebx, dword [esp + 0xc]
neg ebx
and ebx, 0x1f
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
mov ecx, edx
and ecx, 0x1f
shl eax, cl
mov ecx, ebx
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
add edx, ecx
mov dword [esp + 0x58], edx
movzx edx, byte [esi + eax*4 + 7]
lea ecx, [esp + 0x54]
add edi, edx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp dword [esp + 0x10], edi
sbb ecx, ecx
inc ecx
test ecx, eax
jne 0x405f2e
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
add eax, 0xfffffffe
cmp edi, eax
ja 0x405fc8
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
mov ecx, edx
and ecx, 0x1f
mov eax, ebx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add edi, eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffffe
add edx, ecx
cmp edi, eax
jbe 0x405f94
mov dword [esp + 0x58], edx
cmp edi, dword [esp + 0x24]
jae 0x406017
mov ecx, edx
and ecx, 0x1f
shl ebx, cl
mov ecx, dword [esp + 0xc]
neg ecx
and ecx, 0x1f
shr ebx, cl
mov cl, byte [esi + ebx*4 + 4]
mov byte [edi], cl
cmp byte [esi + ebx*4 + 7], 1
jne 0x405ffa
movzx eax, byte [esi + ebx*4 + 6]
add edx, eax
mov dword [esp + 0x58], edx
jmp 0x406017
cmp edx, 0x20
jae 0x406017
movzx ecx, byte [esi + ebx*4 + 6]
add edx, ecx
mov dword [esp + 0x58], edx
cmp edx, 0x20
jbe 0x406017
mov dword [esp + 0x58], 0x20
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x40]
add ebx, 0xfffffffd
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp edi, ebx
sbb edx, edx
neg edx
test edx, eax
je 0x4060c3
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
jmp 0x406050
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
mov ecx, ebx
and ecx, 0x1f
mov eax, edx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
movzx ecx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add ebx, ecx
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 8]
add edi, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + edx*4 + 7]
movzx eax, byte [esi + edx*4 + 6]
add ebx, eax
add edi, ecx
lea ecx, [esp + 0x40]
mov dword [esp + 0x44], ebx
call fcn.00404640
neg eax
sbb edx, edx
mov eax, dword [esp + 0x18]
add eax, 0xfffffffd
inc edx
cmp edi, eax
sbb eax, eax
neg eax
test eax, edx
jne 0x406050
mov ebx, dword [esp + 0x18]
add ebx, 0xfffffffe
lea ecx, [esp + 0x40]
mov dword [esp + 0x10], ebx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp ebx, edi
sbb ecx, ecx
inc ecx
test ecx, eax
je 0x406134
mov ebx, dword [esp + 0xc]
neg ebx
and ebx, 0x1f
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov ecx, edx
and ecx, 0x1f
shl eax, cl
mov ecx, ebx
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
add edx, ecx
mov dword [esp + 0x44], edx
movzx edx, byte [esi + eax*4 + 7]
lea ecx, [esp + 0x40]
add edi, edx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp dword [esp + 0x10], edi
sbb ecx, ecx
inc ecx
test ecx, eax
jne 0x4060ee
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
add eax, 0xfffffffe
cmp edi, eax
ja 0x406188
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
mov ecx, edx
and ecx, 0x1f
mov eax, ebx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add edi, eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffffe
add edx, ecx
cmp edi, eax
jbe 0x406154
mov dword [esp + 0x44], edx
cmp edi, dword [esp + 0x18]
jae 0x4061d7
mov ecx, edx
and ecx, 0x1f
shl ebx, cl
mov ecx, dword [esp + 0xc]
neg ecx
and ecx, 0x1f
shr ebx, cl
mov cl, byte [esi + ebx*4 + 4]
mov byte [edi], cl
cmp byte [esi + ebx*4 + 7], 1
jne 0x4061ba
movzx eax, byte [esi + ebx*4 + 6]
add edx, eax
mov dword [esp + 0x44], edx
jmp 0x4061d7
cmp edx, 0x20
jae 0x4061d7
movzx ecx, byte [esi + ebx*4 + 6]
add edx, ecx
mov dword [esp + 0x44], edx
cmp edx, 0x20
jbe 0x4061d7
mov dword [esp + 0x44], 0x20
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x68]
lea ecx, [esp + 0x78]
add ebx, 0xfffffffd
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp edi, ebx
sbb edx, edx
neg edx
test edx, eax
je 0x406283
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
jmp 0x406210
mov ebx, dword [esp + 0x7c]
mov edx, dword [esp + 0x78]
mov ecx, ebx
and ecx, 0x1f
mov eax, edx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
movzx ecx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add ebx, ecx
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 8]
add edi, eax
shr edx, cl
movzx ecx, word [esi + edx*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + edx*4 + 7]
movzx eax, byte [esi + edx*4 + 6]
add ebx, eax
add edi, ecx
lea ecx, [esp + 0x78]
mov dword [esp + 0x7c], ebx
call fcn.00404640
neg eax
sbb edx, edx
mov eax, dword [esp + 0x14]
add eax, 0xfffffffd
inc edx
cmp edi, eax
sbb eax, eax
neg eax
test eax, edx
jne 0x406210
mov ebx, dword [esp + 0x14]
add ebx, 0xfffffffe
lea ecx, [esp + 0x78]
mov dword [esp + 0x10], ebx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp ebx, edi
sbb ecx, ecx
inc ecx
test ecx, eax
je 0x4062f4
mov ebx, dword [esp + 0xc]
neg ebx
and ebx, 0x1f
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
mov ecx, edx
and ecx, 0x1f
shl eax, cl
mov ecx, ebx
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
add edx, ecx
mov dword [esp + 0x7c], edx
movzx edx, byte [esi + eax*4 + 7]
lea ecx, [esp + 0x78]
add edi, edx
call fcn.00404640
neg eax
sbb eax, eax
inc eax
cmp dword [esp + 0x10], edi
sbb ecx, ecx
inc ecx
test ecx, eax
jne 0x4062ae
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
add eax, 0xfffffffe
cmp edi, eax
ja 0x406348
mov eax, dword [esp + 0xc]
neg eax
and eax, 0x1f
mov dword [esp + 8], eax
mov ecx, edx
and ecx, 0x1f
mov eax, ebx
shl eax, cl
mov ecx, dword [esp + 8]
shr eax, cl
mov cx, word [esi + eax*4 + 4]
mov word [edi], cx
movzx ecx, byte [esi + eax*4 + 6]
movzx eax, byte [esi + eax*4 + 7]
add edi, eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffffe
add edx, ecx
cmp edi, eax
jbe 0x406314
mov dword [esp + 0x7c], edx
cmp edi, dword [esp + 0x14]
jae 0x406397
mov ecx, edx
and ecx, 0x1f
shl ebx, cl
mov ecx, dword [esp + 0xc]
neg ecx
and ecx, 0x1f
shr ebx, cl
mov cl, byte [esi + ebx*4 + 4]
mov byte [edi], cl
cmp byte [esi + ebx*4 + 7], 1
jne 0x40637a
movzx eax, byte [esi + ebx*4 + 6]
add edx, eax
mov dword [esp + 0x7c], edx
jmp 0x406397
cmp edx, 0x20
jae 0x406397
movzx ecx, byte [esi + ebx*4 + 6]
add edx, ecx
mov dword [esp + 0x7c], edx
cmp edx, 0x20
jbe 0x406397
mov dword [esp + 0x7c], 0x20
lea eax, [esp + 0x78]
call fcn.004066f0
mov edx, eax
lea eax, [esp + 0x40]
call fcn.004066f0
and edx, eax
lea eax, [esp + 0x54]
call fcn.004066f0
and edx, eax
lea eax, [esp + 0x2c]
call fcn.004066f0
test eax, edx
mov eax, 0xffffffec
je 0x4063cd
mov eax, dword [ebp + 8]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret