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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
and byte [ebp - 4], 0
mov eax, dword [edi + 0x144]
or dword [edi + 0x150], 0xffffffff
or dword [edi + 0x14c], 0xffffffff
mov esi, dword [edi]
movsx ecx, word [edi + 0x14]
movzx edx, byte [eax + edi + 0x28]
mov eax, dword [edi + 0x140]
imul eax, ecx
lea ebx, [eax + eax*4]
add ebx, dword [esi + edx*8 + 4]
mov dword [ebp - 0x18], ebx
je 0x402a72
and dword [ebp - 0x10], 0
test ecx, ecx
jle 0x402a72
mov esi, dword [ebp - 0x10]
mov al, byte [ebx + 4]
imul esi, esi, 0xac
mov cl, al
and al, 0xf
shr cl, 4
mov byte [ebp - 1], cl
mov cl, al
mov al, byte [ebx + 3]
add esi, 0x41b7a0
cmp al, 3
mov byte [ebp - 3], cl
je 0x40234a
cmp al, 5
je 0x40234a
and byte [ebp - 2], 0
jmp 0x40234e
mov byte [ebp - 2], 1
mov al, byte [ebx + 1]
test al, al
je 0x402360
cmp byte [ebp - 2], 0
jne 0x402360
dec al
mov byte [esi + 0x66], al
mov al, byte [ebx]
test al, al
je 0x402374
cmp al, 0xff
je 0x402374
cmp byte [ebp - 2], 0
jne 0x402374
dec al
mov byte [esi], al
movzx eax, byte [esi + 0x66]
movsx edx, word [edi + 0x20]
cmp eax, edx
jl 0x402397
and dword [0x41cea0], 0
mov dword [ebp - 8], 0x41cd40
mov dword [ebp - 0xc], 0x41cea0
jmp 0x4023ca
imul eax, eax, 0x154
add eax, dword [edi + 4]
mov edx, eax
movzx eax, byte [esi]
mov dword [ebp - 8], edx
mov al, byte [eax + edx + 0x44]
cmp al, 0x10
jb 0x4023b7
mov edx, 0x41cea0
jmp 0x4023be
movzx eax, al
mov edx, dword [edx + eax*4 + 4]
cmp byte [ebp - 2], 0
mov dword [ebp - 0xc], edx
jne 0x4023ca
mov dword [esi + 8], edx
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp byte [esi + 0x6c], 7
mov dword [ebp - 0x24], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], edx
jne 0x4023f0
cmp byte [ebx + 3], 7
je 0x4023f0
mov edx, dword [esi + 0x18]
add edx, eax
mov dword [esi + 0x10], edx
mov al, byte [ebx + 3]
and dword [esi + 0x18], 0
and byte [esi + 2], 0
mov byte [esi + 0x6c], al
mov al, byte [ebx]
test al, al
je 0x40245e
cmp al, 0xff
je 0x40245e
mov ecx, dword [ebp - 0xc]
mov cl, byte [ecx + 0x1f]
add cl, al
mov eax, dword [ebp - 0xc]
dec cl
mov byte [esi + 0x67], cl
test byte [edi + 0x22], 1
movsx eax, byte [eax + 0x11]
je 0x40243c
movzx ecx, cl
cdq
sub eax, edx
neg ecx
sar eax, 1
shl ecx, 6
sub ecx, eax
add ecx, 0x1e00
mov dword [esi + 0x68], ecx
jmp 0x40244b
push eax
movzx eax, cl
push eax
call fcn.00401f0c
pop ecx
mov dword [esi + 0x68], eax
pop ecx
cmp byte [ebp - 2], 0
jne 0x402457
mov eax, dword [esi + 0x68]
mov dword [esi + 0xc], eax
mov cl, byte [ebp - 3]
mov byte [esi + 2], 8
and dword [esi + 0x1c], 0
or byte [esi + 2], 3
cmp byte [ebx + 1], 0
mov dl, byte [ebp - 1]
je 0x402480
push dword [ebp - 0xc]
push esi
call fcn.00402246
mov dl, byte [ebp - 1]
pop ecx
pop ecx
mov cl, byte [ebp - 3]
mov al, byte [ebx + 2]
test al, al
je 0x402496
push eax
push esi
call fcn.00401e16
mov dl, byte [ebp - 1]
pop ecx
pop ecx
mov cl, byte [ebp - 3]
cmp byte [ebx], 0xff
je 0x4024a1
cmp byte [ebx + 3], 0x14
jne 0x4024a5
mov byte [esi + 0x65], 1
mov eax, dword [ebp - 8]
mov al, byte [eax + 0x14c]
test al, 1
mov byte [ebp - 0x1c], al
je 0x40250f
lea eax, [esi + 0x3c]
cmp byte [eax], 0
jne 0x402519
lea ecx, [esi + 0x38]
push 2
push ecx
push eax
lea eax, [esi + 0x30]
push eax
lea eax, [esi + 0x34]
push eax
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x146]
push ecx
mov cl, byte [eax + 0x147]
push ecx
mov cl, byte [eax + 0x148]
push ecx
lea ecx, [eax + 0xa4]
movzx eax, byte [eax + 0x144]
push ecx
push eax
push dword [ebp - 0x1c]
lea eax, [esi + 0x28]
push eax
lea eax, [esi + 0x2c]
push eax
push esi
call fcn.00401d24
mov cl, byte [ebp - 3]
mov dl, byte [ebp - 1]
add esp, 0x38
jmp 0x402519
cmp byte [esi + 0x65], 0
je 0x402519
and dword [esi + 0x34], 0
mov eax, dword [ebp - 8]
mov al, byte [eax + 0x14d]
test al, 1
mov byte [ebp - 0x20], al
je 0x402581
lea eax, [esi + 0x54]
cmp byte [eax], 0
jne 0x402581
lea ecx, [esi + 0x50]
push 4
push ecx
push eax
lea eax, [esi + 0x48]
push eax
lea eax, [esi + 0x4c]
push eax
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x149]
push ecx
mov cl, byte [eax + 0x14a]
push ecx
mov cl, byte [eax + 0x14b]
push ecx
lea ecx, [eax + 0xf4]
movzx eax, byte [eax + 0x145]
push ecx
push eax
push dword [ebp - 0x20]
lea eax, [esi + 0x40]
push eax
lea eax, [esi + 0x44]
push eax
push esi
call fcn.00401d24
mov cl, byte [ebp - 3]
mov dl, byte [ebp - 1]
add esp, 0x38
cmp byte [esi + 0x65], 0
je 0x40259e
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x152]
sub dword [esi + 0x58], eax
jns 0x40259a
and dword [esi + 0x58], 0
or byte [esi + 2], 2
movzx eax, byte [ebx + 3]
cmp eax, 0x15
jg 0x4029cf
je 0x4028e5
dec eax
cmp eax, 0x10
ja case.0x402754.3
jmp dword [eax*4 + 0x402a77]
mov al, byte [ebx + 4]
test al, al
je case.0x402754.3
mov byte [esi + 0x79], al
jmp case.0x402754.3
mov al, byte [ebx + 4]
test al, al
je case.0x402754.3
mov byte [esi + 0x78], al
jmp case.0x402754.3
mov al, byte [ebx + 4]
test al, al
je 0x4025f5
mov byte [esi + 0x84], al
mov eax, dword [esi + 0x68]
mov dword [esi + 0x80], eax
jmp 0x402613
mov eax, dword [esi + 0x68]
mov dword [esi + 0x80], eax
mov al, byte [ebx + 4]
test al, al
je 0x402613
mov byte [esi + 0x7c], al
and byte [esi + 2], 0xf6
jmp case.0x402754.3
test dl, dl
je 0x402626
mov byte [esi + 0x86], dl
test cl, cl
je 0x402630
mov byte [esi + 0x87], cl
push esi
call fcn.00401aad
jmp 0x402a27
mov al, byte [ebx + 4]
test al, al
je 0x402630
mov byte [esi + 0x7c], al
jmp 0x402630
test dl, dl
je 0x402651
mov byte [esi + 0x8a], dl
test cl, cl
je case.0x402754.3
mov byte [esi + 0x8b], cl
jmp case.0x402754.3
movzx eax, byte [ebx + 4]
jmp 0x402811
mov al, byte [ebx + 4]
test al, al
je 0x40267a
movzx eax, al
mov dword [esi + 0x70], eax
cmp dword [esi + 4], 0
je case.0x402754.3
mov ecx, dword [ebp - 0xc]
mov eax, dword [esi + 0x70]
shl eax, 8
mov edx, dword [ecx + 0xc]
add edx, dword [ecx + 8]
cmp eax, edx
jb 0x4026a6
mov al, byte [esi + 2]
and al, 0xf7
or al, 0x20
mov byte [esi + 2], al
jmp case.0x402754.3
mov ecx, dword [esi + 4]
mov dword [ecx + 0x18], eax
jmp case.0x402754.3
mov al, byte [ebx + 4]
test al, al
je case.0x402754.3
mov byte [esi + 0x7c], al
jmp case.0x402754.3
movzx eax, byte [ebx + 4]
and dword [edi + 0x14c], 0
mov dword [edi + 0x150], eax
movsx eax, word [edi + 0x10]
cmp dword [edi + 0x150], eax
jl 0x4026e8
and dword [edi + 0x150], 0
mov byte [ebp - 4], 1
jmp case.0x402754.3
movzx eax, byte [ebx + 4]
jmp 0x402835
movzx eax, dl
movzx ecx, cl
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2]
cmp eax, 0x3f
mov dword [edi + 0x14c], eax
jle 0x402718
and dword [edi + 0x14c], 0
cmp byte [ebp - 4], 0
jne 0x40272b
mov eax, dword [edi + 0x144]
inc eax
mov dword [edi + 0x150], eax
movsx eax, word [edi + 0x10]
cmp dword [edi + 0x150], eax
jl case.0x402754.3
and dword [edi + 0x150], 0
jmp case.0x402754.3
movzx eax, dl
dec eax
cmp eax, 0xd
ja case.0x402754.3
jmp dword [eax*4 + 0x402abb]
test cl, cl
je 0x402765
mov byte [esi + 0xa8], cl
movzx eax, byte [esi + 0xa8]
shl eax, 2
jmp 0x4029f1
test cl, cl
je 0x40277e
mov byte [esi + 0xa9], cl
movzx eax, byte [esi + 0xa9]
shl eax, 2
add dword [esi + 0xc], eax
jmp case.0x402754.3
lea eax, [esi + 0xa2]
mov dl, byte [eax]
and dl, 0xf0
or dl, cl
mov byte [eax], dl
jmp case.0x402754.3
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x11], cl
jmp case.0x402754.3
test cl, cl
jne 0x4027c4
mov eax, dword [edi + 0x140]
mov dword [esi + 0x98], eax
jmp case.0x402754.3
lea eax, [esi + 0x9c]
mov edx, dword [eax]
test edx, edx
jne 0x4027d7
movzx ecx, cl
mov dword [eax], ecx
jmp 0x4027da
dec edx
mov dword [eax], edx
cmp dword [eax], 0
je case.0x402754.3
mov eax, dword [esi + 0x98]
mov dword [edi + 0x14c], eax
jmp case.0x402754.3
lea eax, [esi + 0xa2]
shl cl, 4
mov dl, byte [eax]
and dl, 0xf
or cl, dl
mov byte [eax], cl
jmp case.0x402754.3
movzx eax, cl
shl eax, 4
mov dword [esi + 0x14], eax
jmp 0x402a42
test cl, cl
je 0x402823
mov byte [esi + 0xa7], cl
movzx eax, byte [esi + 0xa7]
add dword [esi + 0x10], eax
push 0x40
pop eax
cmp dword [esi + 0x10], eax
jle 0x402838
mov dword [esi + 0x10], eax
or byte [esi + 2], 2
jmp case.0x402754.3
test cl, cl
je 0x40284b
mov byte [esi + 0xa7], cl
movzx eax, byte [esi + 0xa7]
sub dword [esi + 0x10], eax
jns 0x402838
and dword [esi + 0x10], 0
jmp 0x402838
mov eax, dword [ebp - 0x14]
and byte [esi + 2], 0xf0
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x14], eax
jmp case.0x402754.3
movzx eax, cl
mov ecx, dword [edi + 0x138]
imul ecx, eax
mov dword [edi + 0x148], ecx
jmp case.0x402754.3
mov al, byte [ebx + 4]
cmp al, 0x20
movzx eax, al
jae 0x4028a4
mov dword [edi + 0x138], eax
jmp case.0x402754.3
push eax
push edi
call fcn.00401470
pop ecx
jmp 0x402a27
movzx ecx, byte [ebx + 4]
push 0x40
lea eax, [edi + 0x12c]
pop edx
cmp ecx, edx
mov dword [eax], ecx
jle 0x402838
mov dword [eax], edx
jmp 0x402838
mov al, byte [ebx + 4]
test al, al
je case.0x402754.3
mov byte [edi + 0x130], al
jmp case.0x402754.3
mov eax, dword [ebp - 8]
test byte [eax + 0x14c], 1
je case.0x402754.3
mov ecx, dword [ebp - 8]
xor eax, eax
lea edx, [ecx + 0xa8]
movzx cx, byte [ebx + 4]
cmp cx, word [edx]
jbe 0x402931
mov edx, dword [ebp - 8]
add edx, 0xa8
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 8]
movzx edx, byte [edx + 0x144]
cmp eax, edx
jge 0x402931
add dword [ebp - 0x14], 4
inc eax
mov edx, dword [ebp - 0x14]
cmp cx, word [edx]
ja 0x402916
mov ecx, dword [ebp - 8]
mov dword [esi + 0x2c], eax
movzx ecx, byte [ecx + 0x144]
lea edx, [ecx - 1]
cmp eax, edx
jl 0x40295c
mov eax, dword [ebp - 8]
movzx eax, word [eax + ecx*4 + 0xa2]
mov dword [esi + 0x34], eax
mov byte [esi + 0x3c], 1
jmp case.0x402754.3
mov ecx, dword [ebp - 0x18]
and byte [esi + 0x3c], 0
mov edx, dword [ebp - 8]
lea ebx, [eax + 1]
movzx ecx, byte [ecx + 4]
mov dword [esi + 0x28], ecx
movzx ecx, word [edx + eax*4 + 0xa4]
movzx edi, word [edx + ebx*4 + 0xa4]
mov dword [ebp - 0x14], ecx
movzx ecx, word [edx + eax*4 + 0xa6]
shl ecx, 0x10
sub edi, dword [ebp - 0x14]
je 0x4029aa
mov eax, edx
movzx eax, word [eax + ebx*4 + 0xa6]
shl eax, 0x10
sub eax, ecx
cdq
idiv edi
mov dword [esi + 0x38], eax
jmp 0x4029ae
and dword [esi + 0x38], 0
mov eax, dword [esi + 0x28]
mov edi, dword [ebp + 8]
sub eax, dword [ebp - 0x14]
mov dword [esi + 0x2c], ebx
mov ebx, dword [ebp - 0x18]
imul eax, dword [esi + 0x38]
add eax, ecx
mov dword [esi + 0x30], eax
movsx eax, word [esi + 0x32]
mov dword [esi + 0x34], eax
jmp case.0x402754.3
sub eax, 0x19
je 0x402a38
dec eax
dec eax
je 0x402a2a
dec eax
dec eax
je 0x402a0b
sub eax, 4
jne case.0x402754.3
cmp dl, 1
jne 0x4029f6
test cl, cl
je 0x4029ed
mov byte [esi + 0x7b], cl
movzx eax, byte [esi + 0x7b]
sub dword [esi + 0xc], eax
jmp case.0x402754.3
cmp dl, 2
jne case.0x402754.3
test cl, cl
je 0x402a02
mov byte [esi + 0x7a], cl
movzx eax, byte [esi + 0x7a]
jmp 0x402788
cmp byte [ebx + 4], 0
je 0x402a21
inc dl
inc cl
mov byte [esi + 0x93], dl
mov byte [esi + 0x94], cl
push esi
call fcn.00401feb
pop ecx
jmp case.0x402754.3
cmp byte [ebx + 4], 0
je case.0x402754.3
mov byte [esi + 0x7e], dl
mov byte [esi + 0x7f], cl
jmp case.0x402754.3
mov al, byte [ebx + 4]
test al, al
je case.0x402754.3
mov byte [esi + 0x7d], al
or byte [esi + 2], 4
push dword [ebp - 8]
push esi
call fcn.00401b4b
push edi
push dword [ebp - 0xc]
push esi
call fcn.00402030
movsx eax, word [edi + 0x14]
add esp, 0x14
inc dword [ebp - 0x10]
add ebx, 5
cmp dword [ebp - 0x10], eax
mov dword [ebp - 0x18], ebx
jl 0x402318
pop edi
pop esi
pop ebx
leave
ret