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

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x18]
mov eax, dword [ebp + 0x144]
movsx ecx, word [ebp + 0x14]
push esi
movzx esi, byte [eax + ebp + 0x28]
mov eax, dword [ebp + 0x140]
imul eax, ecx
push edi
mov edi, dword [ebp]
lea edx, [eax + eax*4]
add edx, dword [edi + esi*8 + 4]
mov dword [esp + 0x14], edx
je 0x405722
and dword [esp + 0x18], 0
test ecx, ecx
jle 0x405722
push ebx
jmp 0x40513e
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
movsx edi, word [ebp + 0x20]
imul esi, esi, 0xac
add esi, 0x407a60
movzx eax, byte [esi + 0x66]
cmp eax, edi
mov ecx, 0x408fe0
jl 0x40516d
and dword [0x408fe0], 0
mov edi, 0x409020
jmp 0x405192
imul eax, eax, 0x154
add eax, dword [ebp + 4]
mov edi, eax
movzx eax, byte [esi]
mov al, byte [eax + edi + 0x44]
cmp al, 0x10
jae 0x405192
movzx eax, al
mov eax, dword [edi + eax*4 + 4]
test eax, eax
mov dword [esp + 0x14], eax
jne 0x405196
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 0x405214
lea ecx, [esi + 0x3c]
cmp byte [ecx], 0
jne 0x405214
push 2
lea edx, [esi + 0x38]
push edx
push ecx
lea ecx, [esi + 0x30]
push ecx
lea ecx, [esi + 0x34]
push ecx
xor ecx, ecx
mov cl, byte [edi + 0x146]
push ecx
xor ecx, ecx
mov cl, byte [edi + 0x147]
push ecx
xor ecx, 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.00404316
add esp, 0x38
mov cl, byte [edi + 0x14d]
test cl, 1
je 0x405272
lea eax, [esi + 0x54]
cmp byte [eax], 0
jne 0x405272
push 4
lea edx, [esi + 0x50]
push edx
push eax
lea eax, [esi + 0x48]
push eax
lea eax, [esi + 0x4c]
push eax
xor eax, eax
mov al, byte [edi + 0x149]
push eax
xor eax, eax
mov al, byte [edi + 0x14a]
push eax
xor eax, eax
mov al, byte [edi + 0x14b]
push eax
lea eax, [edi + 0xf4]
push eax
movzx eax, byte [edi + 0x145]
push eax
push ecx
lea eax, [esi + 0x40]
push eax
lea eax, [esi + 0x44]
push eax
push esi
call fcn.00404316
add esp, 0x38
cmp byte [esi + 0x65], 0
je 0x40528c
movzx eax, word [edi + 0x152]
sub dword [esi + 0x58], eax
jns 0x405288
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 0x40530e
dec edx
je 0x4052fb
sub edx, 4
je 0x4052cf
dec edx
dec edx
je 0x4052c7
dec edx
je 0x4052bb
dec edx
jne 0x40531e
push esi
call fcn.00404050
pop ecx
jmp 0x40531e
and eax, 0xf
add dword [esi + 0x14], eax
or byte [esi + 2], 4
jmp 0x40531e
and eax, 0xf
sub dword [esi + 0x14], eax
jmp 0x4052c1
and cl, 0xf
push esi
mov byte [esi + 0x87], cl
call fcn.00404093
pop ecx
mov cl, byte [esi + 0x86]
lea eax, [esi + 0x85]
add byte [eax], cl
mov cl, byte [eax]
cmp cl, 0x1f
jle 0x40531e
sub cl, 0x40
mov byte [eax], cl
jmp 0x40531e
and eax, 0xf
add dword [esi + 0x10], eax
push 0x40
pop eax
cmp dword [esi + 0x10], eax
jle 0x40531a
mov dword [esi + 0x10], eax
jmp 0x40531a
and eax, 0xf
sub dword [esi + 0x10], eax
jns 0x40531a
and dword [esi + 0x10], 0
or byte [esi + 2], 2
movzx eax, byte [esp + 0x13]
cmp eax, 7
jg 0x4054dc
je 0x4054d4
xor ecx, ecx
sub eax, ecx
je 0x405421
dec eax
je 0x405407
dec eax
je 0x4053f1
dec eax
je 0x4053e2
dec eax
je 0x4053b8
dec eax
je 0x4053ab
dec eax
jne 0x4056f5
push esi
call fcn.00404093
pop ecx
mov cl, byte [esi + 0x86]
lea eax, [esi + 0x85]
add byte [eax], cl
mov cl, byte [eax]
cmp cl, 0x1f
jle 0x40537f
sub cl, 0x40
mov byte [eax], cl
mov al, byte [esi + 0x7c]
mov cl, al
shr cl, 4
and al, 0xf
test cl, cl
je 0x4056e1
movzx eax, cl
add dword [esi + 0x10], eax
push 0x40
pop eax
cmp dword [esi + 0x10], eax
jle 0x4056f1
mov dword [esi + 0x10], eax
jmp 0x4056f1
and dword [esi + 0x1c], 0
push esi
call fcn.00404050
pop ecx
jmp 0x40537f
push esi
call fcn.00404093
pop ecx
mov cl, byte [esi + 0x86]
lea eax, [esi + 0x85]
add byte [eax], cl
mov cl, byte [eax]
cmp cl, 0x1f
jle 0x4056f5
sub cl, 0x40
mov byte [eax], cl
jmp 0x4056f5
and dword [esi + 0x1c], 0
push esi
call fcn.00404050
jmp 0x405512
movzx eax, byte [esi + 0x78]
shl eax, 2
add dword [esi + 0xc], eax
mov dword [esi + 0x1c], ecx
or byte [esi + 2], 1
jmp 0x4056f5
movzx eax, byte [esi + 0x79]
shl eax, 2
sub dword [esi + 0xc], eax
push 0x38
pop eax
cmp dword [esi + 0xc], eax
mov dword [esi + 0x1c], ecx
jge 0x4053fe
mov dword [esi + 0xc], eax
jmp 0x4053fe
mov eax, dword [esp + 0x18]
cmp byte [eax + 4], 0
jbe 0x4056f5
mov eax, dword [ebp + 0x134]
push 3
cdq
pop ecx
idiv ecx
dec edx
je 0x40548f
dec edx
jne 0x4053fe
test byte [ebp + 0x22], 1
je 0x405454
movzx eax, byte [esp + 0x24]
shl eax, 6
mov dword [esi + 0x1c], eax
jmp 0x4053fe
mov ebx, dword [esp + 0x14]
movsx eax, byte [ebx + 0x11]
movzx ecx, byte [esp + 0x24]
push eax
movzx eax, byte [esi + 0x67]
add eax, ecx
push eax
call fcn.004044ff
movsx ecx, byte [ebx + 0x11]
push ecx
movzx ecx, byte [esi + 0x67]
push ecx
mov dword [esp + 0x34], eax
call fcn.004044ff
mov ecx, dword [esp + 0x34]
add esp, 0x10
sub ecx, eax
jmp 0x4053fb
test byte [ebp + 0x22], 1
je 0x40549a
movzx eax, bl
jmp 0x40544c
mov eax, dword [esp + 0x14]
movsx eax, byte [eax + 0x11]
push eax
movzx eax, byte [esi + 0x67]
movzx ecx, bl
add eax, ecx
push eax
call fcn.004044ff
mov ebx, eax
mov eax, dword [esp + 0x1c]
movsx eax, byte [eax + 0x11]
push eax
movzx eax, byte [esi + 0x67]
push eax
call fcn.004044ff
add esp, 0x10
sub ebx, eax
mov dword [esi + 0x1c], ebx
jmp 0x4053fe
push esi
call fcn.00404224
jmp 0x405512
sub eax, 0xa
je 0x40537f
sub eax, 4
je 0x40565b
sub eax, 3
je 0x40560a
sub eax, 8
je 0x4055ce
dec eax
dec eax
je 0x405518
dec eax
dec eax
jne 0x4056f5
push esi
call fcn.004045de
pop ecx
jmp 0x4056f5
mov al, byte [esi + 0x7f]
test al, al
je 0x4056f5
movzx ecx, al
mov eax, dword [ebp + 0x134]
cdq
idiv ecx
test edx, edx
jne 0x4056f5
mov al, byte [esi + 0x7e]
test al, al
je 0x4056a7
movzx eax, al
dec eax
cmp eax, 0xe
ja case.0x40554b.8
jmp dword [eax*4 + 0x405729]
dec dword [esi + 0x10]
jmp case.0x40554b.8
add dword [esi + 0x10], 0xfffffffe
jmp case.0x40554b.8
add dword [esi + 0x10], 0xfffffffc
jmp case.0x40554b.8
add dword [esi + 0x10], 0xfffffff8
jmp case.0x40554b.8
add dword [esi + 0x10], 0xfffffff0
jmp case.0x40554b.8
mov eax, dword [esi + 0x10]
shl eax, 1
push 3
cdq
pop ecx
idiv ecx
jmp 0x4055a9
sar dword [esi + 0x10], 1
jmp case.0x40554b.8
inc dword [esi + 0x10]
jmp case.0x40554b.8
add dword [esi + 0x10], 2
jmp case.0x40554b.8
add dword [esi + 0x10], 4
jmp case.0x40554b.8
add dword [esi + 0x10], 8
jmp case.0x40554b.8
add dword [esi + 0x10], 0x10
jmp case.0x40554b.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.0x40554b.8
shl dword [esi + 0x10], 1
push 0x40
lea eax, [esi + 0x10]
pop ecx
cmp dword [eax], ecx
jle 0x4055bd
mov dword [eax], ecx
cmp dword [eax], 0
jge 0x4055c5
and dword [eax], 0
or byte [esi + 2], 2
jmp 0x4056a7
mov al, byte [esi + 0x7d]
mov cl, al
shr cl, 4
and al, 0xf
test cl, cl
je 0x4055f1
movzx eax, cl
add dword [esi + 0x14], eax
mov eax, 0xff
cmp dword [esi + 0x14], eax
jle 0x405601
mov dword [esi + 0x14], eax
jmp 0x405601
test al, al
je 0x405601
movzx eax, al
sub dword [esi + 0x14], eax
jns 0x405601
and dword [esi + 0x14], 0
or byte [esi + 2], 4
jmp 0x4056f5
mov al, byte [ebp + 0x130]
mov cl, al
shr cl, 4
and al, 0xf
test cl, cl
je 0x40563a
movzx ecx, cl
lea eax, [ebp + 0x12c]
add dword [eax], ecx
cmp dword [eax], 0x40
jle 0x4056f5
mov dword [eax], 0x40
jmp 0x4056f5
test al, al
je 0x4056f5
movzx eax, al
lea ecx, [ebp + 0x12c]
sub dword [ecx], eax
jns 0x4056f5
and dword [ecx], 0
jmp 0x4056f5
movzx eax, bl
sub eax, 9
je 0x4056c2
sub eax, 3
je 0x4056b3
dec eax
jne 0x4056f5
movzx eax, byte [esp + 0x24]
cmp dword [ebp + 0x134], eax
jne 0x4056ad
push dword [esp + 0x14]
push esi
call fcn.00404839
mov eax, dword [esi + 0x68]
or byte [esi + 2], 1
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x20]
movzx eax, byte [eax + 2]
test al, al
pop ecx
pop ecx
je 0x4056a7
push eax
push esi
call fcn.00404409
pop ecx
pop ecx
or byte [esi + 2], 8
jmp 0x4056f5
and byte [esi + 2], 0xf0
jmp 0x4056f5
movzx eax, byte [esp + 0x24]
cmp dword [ebp + 0x134], eax
jne 0x4056f5
jmp 0x4056ed
cmp byte [esp + 0x24], 0
je 0x4056f5
mov eax, dword [ebp + 0x134]
movzx ecx, byte [esp + 0x24]
cdq
idiv ecx
test edx, edx
jne 0x4056f5
or byte [esi + 2], 0xb
jmp 0x4056f5
test al, al
je 0x4056f1
movzx eax, al
sub dword [esi + 0x10], eax
jns 0x4056f1
and dword [esi + 0x10], 0
or byte [esi + 2], 2
push edi
push esi
call fcn.00404133
push ebp
push dword [esp + 0x20]
push esi
call fcn.00404623
movsx eax, word [ebp + 0x14]
add dword [esp + 0x2c], 5
add esp, 0x14
inc dword [esp + 0x1c]
cmp dword [esp + 0x1c], eax
jl 0x40513a
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x10
ret