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

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov eax, dword [ebp + 0x144]
mov esi, dword [ebp]
movsx ecx, word [ebp + 0x14]
movzx edx, byte [ebp + eax + 0x28]
mov eax, dword [ebp + 0x140]
imul eax, ecx
mov edx, dword [esi + edx*8 + 4]
lea eax, [eax + eax*4]
add edx, eax
mov dword [esp + 0x10], edx
je 0x40551c
and dword [esp + 0x14], 0
test ecx, ecx
jle 0x40551c
push ebx
push edi
jmp 0x404f22
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, 0x408e88
imul esi, esi, 0xac
add esi, 0x4077a8
mov al, byte [esi + 0x66]
movzx di, al
cmp di, word [ebp + 0x20]
jl 0x404f56
and dword [0x408e88], 0
mov edi, 0x408d28
mov dword [esp + 0x14], ecx
jmp 0x404f89
movzx edi, al
imul edi, edi, 0x154
movzx eax, byte [esi]
add edi, dword [ebp + 4]
mov al, byte [edi + eax + 0x44]
cmp al, 0x10
jb 0x404f73
mov dword [esp + 0x14], ecx
jmp 0x404f7e
movzx eax, al
mov eax, dword [edi + eax*4 + 4]
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
jne 0x404f89
mov dword [esp + 0x14], ecx
mov al, byte [edx + 3]
mov byte [esp + 0x13], al
mov al, byte [edx + 4]
and dword [esi + 0x18], 0
and dword [esi + 0x1c], 0
and byte [esi + 2], 0
mov bl, al
and al, 0xf
mov byte [esp + 0x24], al
mov al, byte [edi + 0x14c]
shr bl, 4
test al, 1
je 0x405002
cmp byte [esi + 0x3c], 0
lea ecx, [esi + 0x3c]
jne 0x405002
lea edx, [esi + 0x38]
push 2
push edx
push ecx
lea ecx, [esi + 0x30]
push ecx
lea ecx, [esi + 0x34]
push ecx
mov cl, byte [edi + 0x146]
push ecx
mov cl, byte [edi + 0x147]
push ecx
mov cl, byte [edi + 0x148]
push ecx
lea ecx, [edi + 0xa4]
push ecx
movzx ecx, byte [edi + 0x144]
push ecx
push eax
lea eax, [esi + 0x28]
push eax
lea eax, [esi + 0x2c]
push eax
push esi
call fcn.004040f5
add esp, 0x38
mov cl, byte [edi + 0x14d]
test cl, 1
je 0x40505b
cmp byte [esi + 0x54], 0
lea eax, [esi + 0x54]
jne 0x40505b
lea edx, [esi + 0x50]
push 4
push edx
push eax
lea eax, [esi + 0x48]
push eax
lea eax, [esi + 0x4c]
push eax
mov al, byte [edi + 0x149]
push eax
mov al, byte [edi + 0x14a]
push eax
mov al, byte [edi + 0x14b]
push eax
lea eax, [edi + 0xf4]
push eax
movzx eax, byte [edi + 0x145]
push eax
lea eax, [esi + 0x40]
push ecx
push eax
lea eax, [esi + 0x44]
push eax
push esi
call fcn.004040f5
add esp, 0x38
cmp byte [esi + 0x65], 0
je 0x405075
movzx eax, word [edi + 0x152]
sub dword [esi + 0x58], eax
jns 0x405071
and dword [esi + 0x58], 0
or byte [esi + 2], 2
mov eax, dword [esp + 0x18]
mov cl, byte [eax + 2]
movzx eax, cl
mov edx, eax
shr edx, 4
sub edx, 6
je 0x4050f7
dec edx
je 0x4050e4
sub edx, 4
je 0x4050b8
dec edx
dec edx
je 0x4050b0
dec edx
je 0x4050a4
dec edx
jne 0x405107
push esi
call fcn.00403e57
pop ecx
jmp 0x405107
and eax, 0xf
add dword [esi + 0x14], eax
or byte [esi + 2], 4
jmp 0x405107
and eax, 0xf
sub dword [esi + 0x14], eax
jmp 0x4050aa
and cl, 0xf
push esi
mov byte [esi + 0x87], cl
call fcn.00403e9a
pop ecx
lea eax, [esi + 0x85]
mov cl, byte [esi + 0x86]
add byte [eax], cl
mov cl, byte [eax]
cmp cl, 0x1f
jle 0x405107
sub cl, 0x40
mov byte [eax], cl
jmp 0x405107
and eax, 0xf
push 0x40
add dword [esi + 0x10], eax
pop eax
cmp dword [esi + 0x10], eax
jle 0x405103
mov dword [esi + 0x10], eax
jmp 0x405103
and eax, 0xf
sub dword [esi + 0x10], eax
jns 0x405103
and dword [esi + 0x10], 0
or byte [esi + 2], 2
movzx eax, byte [esp + 0x13]
cmp eax, 7
jg 0x4052ca
je 0x4052c2
xor ecx, ecx
sub eax, ecx
je 0x40520a
dec eax
je 0x4051f0
dec eax
je 0x4051da
dec eax
je 0x4051cb
dec eax
je 0x4051a1
dec eax
je 0x405194
dec eax
jne 0x4054ee
push esi
call fcn.00403e9a
pop ecx
lea eax, [esi + 0x85]
mov cl, byte [esi + 0x86]
add byte [eax], cl
mov cl, byte [eax]
cmp cl, 0x1f
jle 0x405168
sub cl, 0x40
mov byte [eax], cl
mov al, byte [esi + 0x7c]
mov cl, al
and al, 0xf
shr cl, 4
test cl, cl
je 0x4054da
movzx eax, cl
add dword [esi + 0x10], eax
push 0x40
pop eax
cmp dword [esi + 0x10], eax
jle 0x4054ea
mov dword [esi + 0x10], eax
jmp 0x4054ea
and dword [esi + 0x1c], 0
push esi
call fcn.00403e57
pop ecx
jmp 0x405168
push esi
call fcn.00403e9a
pop ecx
lea eax, [esi + 0x85]
mov cl, byte [esi + 0x86]
add byte [eax], cl
mov cl, byte [eax]
cmp cl, 0x1f
jle 0x4054ee
sub cl, 0x40
mov byte [eax], cl
jmp 0x4054ee
and dword [esi + 0x1c], 0
push esi
call fcn.00403e57
jmp 0x405300
movzx eax, byte [esi + 0x78]
shl eax, 2
add dword [esi + 0xc], eax
mov dword [esi + 0x1c], ecx
or byte [esi + 2], 1
jmp 0x4054ee
movzx eax, byte [esi + 0x79]
shl eax, 2
sub dword [esi + 0xc], eax
push 0x38
pop eax
mov dword [esi + 0x1c], ecx
cmp dword [esi + 0xc], eax
jge 0x4051e7
mov dword [esi + 0xc], eax
jmp 0x4051e7
mov eax, dword [esp + 0x18]
cmp byte [eax + 4], 0
jbe 0x4054ee
mov eax, dword [ebp + 0x134]
push 3
cdq
pop ecx
idiv ecx
dec edx
je 0x40527d
dec edx
jne 0x4051e7
test byte [ebp + 0x22], 1
je 0x40523d
movzx eax, byte [esp + 0x24]
shl eax, 6
mov dword [esi + 0x1c], eax
jmp 0x4051e7
mov ebx, dword [esp + 0x14]
movzx ecx, byte [esp + 0x24]
movsx eax, byte [ebx + 0x11]
push eax
movzx eax, byte [esi + 0x67]
add eax, ecx
push eax
call fcn.004042e4
mov edx, eax
movsx eax, byte [ebx + 0x11]
push eax
mov dword [esp + 0x30], edx
movzx eax, byte [esi + 0x67]
push eax
call fcn.004042e4
mov ecx, dword [esp + 0x34]
add esp, 0x10
sub ecx, eax
mov dword [esi + 0x1c], ecx
jmp 0x4051e7
test byte [ebp + 0x22], 1
je 0x405288
movzx eax, bl
jmp 0x405235
mov eax, dword [esp + 0x14]
movzx ecx, bl
movsx eax, byte [eax + 0x11]
push eax
movzx eax, byte [esi + 0x67]
add eax, ecx
push eax
call fcn.004042e4
mov ebx, eax
mov eax, dword [esp + 0x1c]
movsx eax, byte [eax + 0x11]
push eax
movzx eax, byte [esi + 0x67]
push eax
call fcn.004042e4
add esp, 0x10
sub ebx, eax
mov dword [esi + 0x1c], ebx
jmp 0x4051e7
push esi
call fcn.00404013
jmp 0x405300
sub eax, 0xa
je 0x405168
sub eax, 4
je 0x405455
sub eax, 3
je 0x4053f8
sub eax, 8
je 0x4053bc
dec eax
dec eax
je 0x405306
dec eax
dec eax
jne 0x4054ee
push esi
call fcn.004043c4
pop ecx
jmp 0x4054ee
mov al, byte [esi + 0x7f]
test al, al
je 0x4054ee
movzx ecx, al
mov eax, dword [ebp + 0x134]
cdq
idiv ecx
test edx, edx
jne 0x4054ee
mov al, byte [esi + 0x7e]
test al, al
je 0x4054a0
movzx eax, al
dec eax
cmp eax, 0xe
ja case.0x405339.8
jmp dword [eax*4 + 0x405522]
dec dword [esi + 0x10]
jmp case.0x405339.8
add dword [esi + 0x10], 0xfffffffe
jmp case.0x405339.8
add dword [esi + 0x10], 0xfffffffc
jmp case.0x405339.8
add dword [esi + 0x10], 0xfffffff8
jmp case.0x405339.8
add dword [esi + 0x10], 0xfffffff0
jmp case.0x405339.8
mov eax, dword [esi + 0x10]
push 3
shl eax, 1
cdq
pop ecx
idiv ecx
jmp 0x405397
sar dword [esi + 0x10], 1
jmp case.0x405339.8
inc dword [esi + 0x10]
jmp case.0x405339.8
add dword [esi + 0x10], 2
jmp case.0x405339.8
add dword [esi + 0x10], 4
jmp case.0x405339.8
add dword [esi + 0x10], 8
jmp case.0x405339.8
add dword [esi + 0x10], 0x10
jmp case.0x405339.8
mov eax, dword [esi + 0x10]
lea eax, [eax + eax*2]
cdq
sub eax, edx
sar eax, 1
mov dword [esi + 0x10], eax
jmp case.0x405339.8
shl dword [esi + 0x10], 1
push 0x40
lea eax, [esi + 0x10]
pop ecx
cmp dword [eax], ecx
jle 0x4053ab
mov dword [eax], ecx
cmp dword [eax], 0
jge 0x4053b3
and dword [eax], 0
or byte [esi + 2], 2
jmp 0x4054a0
mov al, byte [esi + 0x7d]
mov cl, al
and al, 0xf
shr cl, 4
test cl, cl
je 0x4053df
movzx eax, cl
add dword [esi + 0x14], eax
mov eax, 0xff
cmp dword [esi + 0x14], eax
jle 0x4053ef
mov dword [esi + 0x14], eax
jmp 0x4053ef
test al, al
je 0x4053ef
movzx eax, al
sub dword [esi + 0x14], eax
jns 0x4053ef
and dword [esi + 0x14], 0
or byte [esi + 2], 4
jmp 0x4054ee
mov al, byte [ebp + 0x130]
mov cl, al
and al, 0xf
shr cl, 4
test cl, cl
je 0x405430
movzx ecx, cl
add dword [ebp + 0x12c], ecx
cmp dword [ebp + 0x12c], 0x40
lea eax, [ebp + 0x12c]
jle 0x4054ee
mov dword [eax], 0x40
jmp 0x4054ee
test al, al
je 0x4054ee
movzx eax, al
sub dword [ebp + 0x12c], eax
lea ecx, [ebp + 0x12c]
jns 0x4054ee
and dword [ecx], 0
jmp 0x4054ee
movzx eax, bl
sub eax, 9
je 0x4054bb
sub eax, 3
je 0x4054ac
dec eax
jne 0x4054ee
movzx eax, byte [esp + 0x24]
cmp dword [ebp + 0x134], eax
jne 0x4054a6
push dword [esp + 0x14]
push esi
call fcn.00404622
mov eax, dword [esi + 0x68]
or byte [esi + 2], 1
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x20]
pop ecx
mov al, byte [eax + 2]
pop ecx
test al, al
je 0x4054a0
push eax
push esi
call fcn.004041ee
pop ecx
pop ecx
or byte [esi + 2], 8
jmp 0x4054ee
and byte [esi + 2], 0xf0
jmp 0x4054ee
movzx eax, byte [esp + 0x24]
cmp dword [ebp + 0x134], eax
jne 0x4054ee
jmp 0x4054e6
cmp byte [esp + 0x24], 0
je 0x4054ee
mov eax, dword [ebp + 0x134]
movzx ecx, byte [esp + 0x24]
cdq
idiv ecx
test edx, edx
jne 0x4054ee
or byte [esi + 2], 0xb
jmp 0x4054ee
test al, al
je 0x4054ea
movzx eax, al
sub dword [esi + 0x10], eax
jns 0x4054ea
and dword [esi + 0x10], 0
or byte [esi + 2], 2
push edi
push esi
call fcn.00403f28
push ebp
push dword [esp + 0x20]
push esi
call fcn.00404409
movsx eax, word [ebp + 0x14]
add dword [esp + 0x2c], 5
add esp, 0x14
inc dword [esp + 0x1c]
cmp dword [esp + 0x1c], eax
jl 0x404f1e
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x10
ret