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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
movsx edx, word [ebx + 0x14]
mov esi, dword [ebx + 0x140]
mov eax, dword [ebx + 0x144]
imul esi, edx
movzx ecx, byte [eax + ebx + 0x28]
imul esi, esi, 5
mov eax, dword [ebx]
add esi, dword [eax + ecx*8 + 4]
mov dword [ebp - 0x10], esi
je 0x402776
xor ecx, ecx
mov dword [ebp - 0x14], ecx
test edx, edx
jle 0x402776
push edi
movsx eax, word [ebx + 0x20]
mov edi, ecx
imul edi, edi, 0xac
add edi, 0x430640
movzx edx, byte [edi + 0x66]
cmp edx, eax
jl 0x40218e
and dword [0x431d20], 0
mov edx, 0x431bc0
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], 0x431d20
jmp 0x4021c2
movzx eax, byte [edi]
imul edx, edx, 0x154
add edx, dword [ebx + 4]
mov dword [ebp - 0xc], edx
mov al, byte [eax + edx + 0x44]
cmp al, 0x10
jb 0x4021ae
mov dword [ebp - 8], 0x431d20
jmp 0x4021c2
movzx eax, al
mov ecx, 0x431d20
mov eax, dword [edx + eax*4 + 4]
test eax, eax
cmovne ecx, eax
mov dword [ebp - 8], ecx
mov al, byte [esi + 3]
mov byte [ebp - 2], al
mov al, byte [esi + 4]
mov cl, al
and al, 0xf
mov byte [ebp + 0xb], al
xor eax, eax
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], eax
mov byte [edi + 2], al
mov dl, byte [edx + 0x14c]
shr cl, 4
mov byte [ebp - 1], cl
test dl, 1
je 0x402240
lea ecx, [edi + 0x3c]
cmp byte [ecx], al
jne 0x402240
push 2
lea eax, [edi + 0x38]
push eax
push ecx
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 0x30]
push eax
lea eax, [edi + 0x34]
push eax
movzx eax, byte [ecx + 0x146]
push eax
movzx eax, byte [ecx + 0x147]
push eax
movzx eax, byte [ecx + 0x148]
push eax
lea eax, [ecx + 0xa4]
push eax
movzx eax, byte [ecx + 0x144]
push eax
push edx
lea eax, [edi + 0x28]
push eax
lea eax, [edi + 0x2c]
push eax
push edi
call fcn.00403262
add esp, 0x38
mov eax, dword [ebp - 0xc]
mov dl, byte [eax + 0x14d]
test dl, 1
je 0x4022a4
lea ecx, [edi + 0x54]
cmp byte [ecx], 0
jne 0x4022a4
push 4
lea eax, [edi + 0x50]
push eax
push ecx
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 0x48]
push eax
lea eax, [edi + 0x4c]
push eax
movzx eax, byte [ecx + 0x149]
push eax
movzx eax, byte [ecx + 0x14a]
push eax
movzx eax, byte [ecx + 0x14b]
push eax
lea eax, [ecx + 0xf4]
push eax
movzx eax, byte [ecx + 0x145]
push eax
push edx
lea eax, [edi + 0x40]
push eax
lea eax, [edi + 0x44]
push eax
push edi
call fcn.00403262
mov eax, dword [ebp - 0xc]
add esp, 0x38
cmp byte [edi + 0x65], 0
je 0x4022c4
movzx eax, word [eax + 0x152]
sub dword [edi + 0x58], eax
mov eax, dword [edi + 0x58]
push 0
pop ecx
cmovs eax, ecx
or byte [edi + 2], 2
mov dword [edi + 0x58], eax
mov dl, byte [esi + 2]
movzx ecx, dl
mov eax, ecx
shr eax, 4
sub eax, 6
je 0x40234d
dec eax
je 0x402333
sub eax, 4
je 0x402303
dec eax
dec eax
je 0x4022fb
dec eax
je 0x4022ef
dec eax
jne 0x402363
push edi
call fcn.0040321c
pop ecx
jmp 0x402363
and ecx, 0xf
add dword [edi + 0x14], ecx
or byte [edi + 2], 4
jmp 0x402363
and ecx, 0xf
sub dword [edi + 0x14], ecx
jmp 0x4022f5
and dl, 0xf
push edi
mov byte [edi + 0x87], dl
call fcn.004038b4
mov al, byte [edi + 0x86]
add byte [edi + 0x85], al
mov al, byte [edi + 0x85]
pop ecx
cmp al, 0x1f
jle 0x402363
sub al, 0x40
mov byte [edi + 0x85], al
jmp 0x402363
and ecx, 0xf
add dword [edi + 0x10], ecx
mov eax, dword [edi + 0x10]
push 0x40
pop edx
cmp eax, edx
cmovg eax, edx
or byte [edi + 2], 2
mov dword [edi + 0x10], eax
jmp 0x402366
and ecx, 0xf
sub dword [edi + 0x10], ecx
mov eax, dword [edi + 0x10]
push 0
pop ecx
cmovs eax, ecx
or byte [edi + 2], 2
mov dword [edi + 0x10], eax
push 0x40
pop edx
movzx eax, byte [ebp - 2]
cmp eax, 7
jg 0x4024fd
je 0x4024f2
xor ecx, ecx
sub eax, ecx
je 0x40246b
dec eax
je 0x40244e
dec eax
je 0x40243c
dec eax
je 0x40242d
dec eax
je 0x4023ff
dec eax
je 0x4023f3
dec eax
jne 0x402746
push edi
call fcn.004038b4
mov al, byte [edi + 0x86]
add byte [edi + 0x85], al
mov al, byte [edi + 0x85]
pop ecx
cmp al, 0x1f
jle 0x4023ca
sub al, 0x40
mov byte [edi + 0x85], al
mov al, byte [edi + 0x7c]
mov cl, al
shr cl, 4
and al, 0xf
test cl, cl
je 0x40272c
movzx eax, cl
add dword [edi + 0x10], eax
push 0x40
pop eax
cmp dword [edi + 0x10], eax
jle 0x402742
jmp 0x40273f
push edi
mov dword [edi + 0x1c], ecx
call fcn.0040321c
pop ecx
jmp 0x4023ca
push edi
call fcn.004038b4
mov al, byte [edi + 0x86]
add byte [edi + 0x85], al
mov al, byte [edi + 0x85]
pop ecx
cmp al, 0x1f
jle 0x402746
sub al, 0x40
mov byte [edi + 0x85], al
jmp 0x402746
push edi
mov dword [edi + 0x1c], ecx
call fcn.0040321c
pop ecx
jmp 0x402746
movzx eax, byte [edi + 0x78]
shl eax, 2
add dword [edi + 0xc], eax
mov dword [edi + 0x1c], ecx
jmp 0x4024e9
movzx eax, byte [edi + 0x79]
shl eax, 2
sub dword [edi + 0xc], eax
mov eax, dword [edi + 0xc]
push 0x38
mov dword [edi + 0x1c], ecx
pop ecx
cmp eax, ecx
cmovl eax, ecx
mov dword [edi + 0xc], eax
jmp 0x4024e9
cmp byte [esi + 4], cl
jbe 0x402746
mov eax, dword [ebx + 0x134]
push 3
cdq
pop ecx
idiv ecx
dec edx
je 0x4024a0
dec edx
jne 0x4024e9
test byte [ebx + 0x22], 1
je 0x402492
movzx eax, byte [ebp + 0xb]
jmp 0x4024aa
mov eax, dword [ebp - 8]
movsx eax, byte [eax + 0x11]
push eax
movzx eax, byte [ebp + 0xb]
jmp 0x4024be
test byte [ebx + 0x22], 1
je 0x4024b2
movzx eax, byte [ebp - 1]
shl eax, 6
mov dword [edi + 0x1c], eax
jmp 0x4024e9
mov eax, dword [ebp - 8]
movsx eax, byte [eax + 0x11]
push eax
movzx eax, byte [ebp - 1]
movzx ecx, byte [edi + 0x67]
add ecx, eax
push ecx
call fcn.00402fe4
mov esi, eax
mov eax, dword [ebp - 8]
movsx ecx, byte [eax + 0x11]
push ecx
movzx ecx, byte [edi + 0x67]
push ecx
call fcn.00402fe4
add esp, 0x10
sub esi, eax
mov dword [edi + 0x1c], esi
mov esi, dword [ebp - 0x10]
or byte [edi + 2], 1
jmp 0x402746
push edi
call fcn.004034c9
jmp 0x402436
sub eax, 0xa
je 0x40270e
sub eax, 4
je 0x402688
push 3
pop ecx
sub eax, ecx
je 0x402634
sub eax, 8
je 0x4025f5
dec eax
dec eax
je 0x40253a
dec eax
dec eax
jne 0x402746
push edi
call fcn.0040360b
jmp 0x402436
mov al, byte [edi + 0x7f]
test al, al
je 0x402746
movzx ecx, al
mov eax, dword [ebx + 0x134]
cdq
idiv ecx
test edx, edx
jne 0x402746
mov al, byte [edi + 0x7e]
test al, al
je 0x4025ec
movzx eax, al
dec eax
cmp eax, 0xe
ja case.0x40256d.8
jmp dword [eax*4 + 0x40277d]
dec dword [edi + 0x10]
jmp case.0x40256d.8
add dword [edi + 0x10], 0xfffffffe
jmp case.0x40256d.8
add dword [edi + 0x10], 0xfffffffc
jmp case.0x40256d.8
add dword [edi + 0x10], 0xfffffff8
jmp case.0x40256d.8
add dword [edi + 0x10], 0xfffffff0
jmp case.0x40256d.8
mov eax, dword [edi + 0x10]
add eax, eax
push 3
cdq
pop ecx
idiv ecx
mov dword [edi + 0x10], eax
jmp case.0x40256d.8
sar dword [edi + 0x10], 1
jmp case.0x40256d.8
inc dword [edi + 0x10]
jmp case.0x40256d.8
add dword [edi + 0x10], 2
jmp case.0x40256d.8
add dword [edi + 0x10], 4
jmp case.0x40256d.8
add dword [edi + 0x10], 8
jmp case.0x40256d.8
add dword [edi + 0x10], 0x10
jmp case.0x40256d.8
mov eax, dword [edi + 0x10]
imul eax, eax, 3
cdq
sub eax, edx
sar eax, 1
jmp 0x40259c
shl dword [edi + 0x10], 1
push 0x40
pop eax
cmp dword [edi + 0x10], eax
jle 0x4025de
mov dword [edi + 0x10], eax
cmp dword [edi + 0x10], 0
jge 0x4025e8
and dword [edi + 0x10], 0
or byte [edi + 2], 2
or byte [edi + 2], 8
jmp 0x402746
mov al, byte [edi + 0x7d]
mov cl, al
shr cl, 4
and al, 0xf
test cl, cl
je 0x402615
movzx eax, cl
add dword [edi + 0x14], eax
mov eax, 0xff
cmp dword [edi + 0x14], eax
jle 0x40262b
jmp 0x402628
test al, al
je 0x40262b
movzx eax, al
sub dword [edi + 0x14], eax
mov eax, dword [edi + 0x14]
push 0
pop ecx
cmovs eax, ecx
mov dword [edi + 0x14], eax
or byte [edi + 2], 4
jmp 0x402746
mov al, byte [ebx + 0x130]
mov cl, al
shr cl, 4
and al, 0xf
test cl, cl
je 0x402665
movzx eax, cl
add dword [ebx + 0x12c], eax
cmp dword [ebx + 0x12c], edx
jle 0x402746
mov dword [ebx + 0x12c], edx
jmp 0x402746
test al, al
je 0x402746
movzx eax, al
sub dword [ebx + 0x12c], eax
jns 0x402746
and dword [ebx + 0x12c], 0
jmp 0x402746
movzx eax, byte [ebp - 1]
sub eax, 9
je 0x4026f1
push 3
pop ecx
sub eax, ecx
je 0x4026df
dec eax
jne 0x402746
movzx eax, byte [ebp + 0xb]
cmp dword [ebx + 0x134], eax
jne 0x4026d9
push dword [ebp - 8]
push edi
call fcn.0040344b
mov eax, dword [edi + 0x68]
or byte [edi + 2], 1
mov dword [edi + 0xc], eax
mov al, byte [esi + 2]
pop ecx
pop ecx
test al, al
je 0x4025ec
push eax
push edi
call fcn.0040335b
pop ecx
pop ecx
jmp 0x4025ec
and byte [edi + 2], 0xf0
jmp 0x402746
movzx eax, byte [ebp + 0xb]
cmp dword [ebx + 0x134], eax
jne 0x402746
and dword [edi + 0x10], 0
jmp 0x402742
mov al, byte [ebp + 0xb]
test al, al
je 0x402746
movzx ecx, al
mov eax, dword [ebx + 0x134]
cdq
idiv ecx
test edx, edx
jne 0x402746
or byte [edi + 2], 0xb
jmp 0x402746
mov al, byte [edi + 0x7c]
mov cl, al
shr cl, 4
and al, 0xf
test cl, cl
je 0x40272c
movzx eax, cl
add dword [edi + 0x10], eax
cmp dword [edi + 0x10], edx
jle 0x402742
mov dword [edi + 0x10], edx
jmp 0x402742
test al, al
je 0x402742
movzx eax, al
sub dword [edi + 0x10], eax
mov eax, dword [edi + 0x10]
push 0
pop ecx
cmovs eax, ecx
mov dword [edi + 0x10], eax
or byte [edi + 2], 2
push dword [ebp - 0xc]
push edi
call fcn.00403105
push ebx
push dword [ebp - 8]
push edi
call fcn.0040365c
mov ecx, dword [ebp - 0x14]
movsx eax, word [ebx + 0x14]
add esp, 0x14
inc ecx
add esi, 5
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], esi
cmp ecx, eax
jl 0x40215c
pop edi
pop esi
pop ebx
leave
ret