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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push edi
push esi
push ebx
mov byte [ebp - 1], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x150], 0xffffffff
mov dword [eax + 0x14c], 0xffffffff
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x144]
movzx ecx, byte [eax + edx + 0x28]
mov edx, dword [edx]
mov esi, dword [ebp + 8]
movsx ebx, word [esi + 0x14]
mov eax, ebx
imul eax, dword [esi + 0x140]
lea esi, [eax + eax*4]
add esi, dword [edx + ecx*8 + 4]
je 0x404bc4
mov dword [ebp - 8], 0
cmp dword [ebp - 8], ebx
jge 0x404bc4
lea esi, [esi]
mov byte [ebp - 0x39], 0
mov al, byte [esi + 4]
mov byte [ebp - 0x11], al
shr byte [ebp - 0x11], 4
and al, 0xf
mov byte [ebp - 0x30], al
mov edi, dword [ebp - 8]
lea eax, [edi + edi*4]
lea eax, [edi + eax*4]
lea eax, [edi + eax*2]
lea ebx, [eax*4 + 0x429ee0]
mov al, byte [esi + 3]
cmp al, 3
je 0x4042c1
cmp al, 5
jne 0x4042c5
mov byte [ebp - 0x39], 1
mov al, byte [esi + 1]
test al, al
je 0x4042d7
cmp byte [ebp - 0x39], 0
jne 0x4042d7
dec al
mov byte [ebx + 0x66], al
mov al, byte [esi]
test al, al
je 0x4042eb
cmp al, 0xff
je 0x4042eb
cmp byte [ebp - 0x39], 0
jne 0x4042eb
dec al
mov byte [ebx], al
movzx edx, byte [ebx + 0x66]
mov ecx, dword [ebp + 8]
movsx eax, word [ecx + 0x20]
cmp edx, eax
jl 0x404314
mov dword [ebp - 0xc], 0x429d40
mov dword [ebp - 0x10], 0x429ea0
mov dword [0x429ea0], 0
jmp 0x40435c
lea eax, [edx + edx*4]
mov edx, eax
shl edx, 4
add eax, edx
mov edi, dword [ebp + 8]
mov edx, dword [edi + 4]
lea eax, [edx + eax*4]
mov dword [ebp - 0xc], eax
movzx edx, byte [ebx]
add eax, 0x44
cmp byte [edx + eax], 0xf
jbe 0x404340
mov dword [ebp - 0x10], 0x429ea0
jmp 0x404350
movzx edx, byte [edx + eax]
mov eax, dword [ebp - 0xc]
add eax, 4
mov edx, dword [eax + edx*4]
mov dword [ebp - 0x10], edx
cmp byte [ebp - 0x39], 0
jne 0x40435c
mov eax, dword [ebp - 0x10]
mov dword [ebx + 8], eax
mov edi, dword [ebx + 0x10]
mov edx, dword [ebx + 0xc]
mov dword [ebp - 0x34], edx
mov ecx, dword [ebx + 0x14]
mov dword [ebp - 0x38], ecx
cmp byte [ebx + 0x6c], 7
jne 0x40437f
cmp byte [esi + 3], 7
je 0x40437f
mov eax, dword [ebx + 0x18]
add eax, edi
mov dword [ebx + 0x10], eax
mov al, byte [esi + 3]
mov byte [ebx + 0x6c], al
mov dword [ebx + 0x18], 0
mov byte [ebx + 2], 0
mov al, byte [esi]
test al, al
je 0x4043ff
cmp al, 0xff
je 0x4043ff
mov edx, dword [ebp - 0x10]
add al, byte [edx + 0x1f]
dec al
mov byte [ebx + 0x67], al
mov ecx, dword [ebp + 8]
test byte [ecx + 0x22], 1
je 0x4043d4
mov al, byte [edx + 0x11]
shr al, 7
add al, byte [edx + 0x11]
sar al, 1
movsx eax, al
mov edx, 0x1e00
sub edx, eax
movzx eax, byte [ebx + 0x67]
shl eax, 6
sub edx, eax
mov dword [ebx + 0x68], edx
jmp 0x4043ef
add esp, 0xfffffff8
mov edx, dword [ebp - 0x10]
movsx eax, byte [edx + 0x11]
push eax
movzx eax, byte [ebx + 0x67]
push eax
call fcn.00403cd0
mov dword [ebx + 0x68], eax
add esp, 0x10
cmp byte [ebp - 0x39], 0
jne 0x4043fb
mov eax, dword [ebx + 0x68]
mov dword [ebx + 0xc], eax
mov byte [ebx + 2], 8
mov dword [ebx + 0x1c], 0
or byte [ebx + 2], 3
cmp byte [esi + 1], 0
je 0x404420
add esp, 0xfffffff8
mov ecx, dword [ebp - 0x10]
push ecx
push ebx
call fcn.00404188
add esp, 0x10
cmp byte [esi + 2], 0
je 0x404437
add esp, 0xfffffff8
movzx eax, byte [esi + 2]
push eax
push ebx
call fcn.00403b68
add esp, 0x10
cmp byte [esi], 0xff
je 0x404442
cmp byte [esi + 3], 0x14
jne 0x404446
mov byte [ebx + 0x65], 1
mov eax, dword [ebp - 0xc]
test byte [eax + 0x14c], 1
je 0x4044b4
cmp byte [ebx + 0x3c], 0
jne 0x4044c1
add esp, 0xfffffff8
push 2
lea eax, [ebx + 0x38]
push eax
lea eax, [ebx + 0x3c]
push eax
lea eax, [ebx + 0x30]
push eax
lea eax, [ebx + 0x34]
push eax
mov edx, dword [ebp - 0xc]
movzx eax, byte [edx + 0x146]
push eax
movzx eax, byte [edx + 0x147]
push eax
movzx eax, byte [edx + 0x148]
push eax
mov eax, edx
add eax, 0xa4
push eax
movzx eax, byte [edx + 0x144]
push eax
movzx eax, byte [edx + 0x14c]
push eax
lea eax, [ebx + 0x28]
push eax
lea eax, [ebx + 0x2c]
push eax
push ebx
call fcn.00403a40
add esp, 0x40
jmp 0x4044c1
cmp byte [ebx + 0x65], 0
je 0x4044c1
mov dword [ebx + 0x34], 0
mov ecx, dword [ebp - 0xc]
test byte [ecx + 0x14d], 1
je 0x404529
cmp byte [ebx + 0x54], 0
jne 0x404529
add esp, 0xfffffff8
push 4
lea eax, [ebx + 0x50]
push eax
lea eax, [ebx + 0x54]
push eax
lea eax, [ebx + 0x48]
push eax
lea eax, [ebx + 0x4c]
push eax
movzx eax, byte [ecx + 0x149]
push eax
movzx eax, byte [ecx + 0x14a]
push eax
movzx eax, byte [ecx + 0x14b]
push eax
mov eax, ecx
add eax, 0xf4
push eax
movzx eax, byte [ecx + 0x145]
push eax
movzx eax, byte [ecx + 0x14d]
push eax
lea eax, [ebx + 0x40]
push eax
lea eax, [ebx + 0x44]
push eax
push ebx
call fcn.00403a40
add esp, 0x40
cmp byte [ebx + 0x65], 0
je 0x404552
mov edx, dword [ebp - 0xc]
movzx eax, word [edx + 0x152]
mov ecx, dword [ebx + 0x58]
sub ecx, eax
mov eax, ecx
mov dword [ebx + 0x58], eax
test eax, eax
jge 0x40454e
mov dword [ebx + 0x58], 0
or byte [ebx + 2], 2
movzx eax, byte [esi + 3]
cmp eax, 0x21
ja case.0x40455f.0
jmp dword [eax*4 + 0x404568]
mov al, byte [esi + 4]
test al, al
je case.0x40455f.0
mov byte [ebx + 0x79], al
jmp case.0x40455f.0
mov al, byte [esi + 4]
test al, al
je case.0x40455f.0
mov byte [ebx + 0x78], al
jmp case.0x40455f.0
mov al, byte [esi + 4]
test al, al
je 0x404625
mov byte [ebx + 0x84], al
mov eax, dword [ebx + 0x68]
mov dword [ebx + 0x80], eax
and byte [ebx + 2], 0xf6
jmp case.0x40455f.0
mov eax, dword [ebx + 0x68]
mov dword [ebx + 0x80], eax
mov al, byte [esi + 4]
test al, al
je 0x40462e
mov byte [ebx + 0x7c], al
jmp 0x40462e
cmp byte [ebp - 0x11], 0
je 0x40465f
mov al, byte [ebp - 0x11]
mov byte [ebx + 0x86], al
cmp byte [ebp - 0x30], 0
je 0x40467a
mov dl, byte [ebp - 0x30]
mov byte [ebx + 0x87], dl
jmp 0x40467a
mov al, byte [esi + 4]
test al, al
je 0x40467a
mov byte [ebx + 0x7c], al
add esp, 0xfffffff4
push ebx
call fcn.004036f8
add esp, 0x10
jmp case.0x40455f.0
cmp byte [ebp - 0x11], 0
je 0x40469b
mov cl, byte [ebp - 0x11]
mov byte [ebx + 0x8a], cl
cmp byte [ebp - 0x30], 0
je case.0x40455f.0
mov al, byte [ebp - 0x30]
mov byte [ebx + 0x8b], al
jmp case.0x40455f.0
movzx eax, byte [esi + 4]
jmp 0x4048fb
cmp byte [esi + 4], 0
je 0x4046cd
movzx eax, byte [esi + 4]
mov dword [ebx + 0x70], eax
mov ecx, dword [ebx + 4]
test ecx, ecx
je case.0x40455f.0
mov edx, dword [ebx + 0x70]
shl edx, 8
mov edi, dword [ebp - 0x10]
mov eax, dword [edi + 0xc]
add eax, dword [edi + 8]
cmp edx, eax
jb 0x4046fc
mov al, byte [ebx + 2]
and al, 0xf7
or al, 0x20
mov byte [ebx + 2], al
jmp case.0x40455f.0
mov dword [ecx + 0x18], edx
jmp case.0x40455f.0
mov al, byte [esi + 4]
test al, al
je case.0x40455f.0
mov byte [ebx + 0x7c], al
jmp case.0x40455f.0
movzx edx, byte [esi + 4]
mov eax, dword [ebp + 8]
mov dword [eax + 0x150], edx
mov dword [eax + 0x14c], 0
mov ecx, dword [ebp + 8]
movsx eax, word [ecx + 0x10]
cmp edx, eax
jl 0x404744
mov dword [ecx + 0x150], 0
mov byte [ebp - 1], 1
jmp case.0x40455f.0
movzx eax, byte [esi + 4]
mov dword [ebx + 0x10], eax
or byte [ebx + 2], 2
jmp case.0x40455f.0
movzx eax, byte [ebp - 0x11]
lea eax, [eax + eax*4]
movzx edx, byte [ebp - 0x30]
lea eax, [edx + eax*2]
mov edi, dword [ebp + 8]
mov dword [edi + 0x14c], eax
cmp eax, 0x3f
jle 0x404786
mov dword [edi + 0x14c], 0
mov al, 0
test al, al
jne 0x4047a2
cmp byte [ebp - 1], 0
jne 0x4047a2
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x144]
inc ecx
mov dword [edx + 0x150], ecx
mov edi, dword [ebp + 8]
movsx eax, word [edi + 0x10]
cmp dword [edi + 0x150], eax
jl case.0x40455f.0
mov dword [edi + 0x150], 0
jmp case.0x40455f.0
movzx eax, byte [ebp - 0x11]
cmp eax, 0xf
ja case.0x40455f.0
jmp dword [eax*4 + 0x4047d8]
cmp byte [ebp - 0x30], 0
je 0x404827
mov al, byte [ebp - 0x30]
mov byte [ebx + 0xa8], al
movzx eax, byte [ebx + 0xa8]
shl eax, 2
sub dword [ebx + 0xc], eax
jmp case.0x40455f.0
cmp byte [ebp - 0x30], 0
je 0x40484b
mov dl, byte [ebp - 0x30]
mov byte [ebx + 0xa9], dl
movzx eax, byte [ebx + 0xa9]
shl eax, 2
jmp 0x404b8a
mov al, byte [ebx + 0xa2]
and al, 0xf0
jmp 0x4048e4
mov cl, byte [ebp - 0x30]
mov edi, dword [ebp - 0x10]
mov byte [edi + 0x11], cl
jmp case.0x40455f.0
cmp byte [ebp - 0x30], 0
jne 0x404894
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x140]
mov dword [ebx + 0x98], eax
jmp case.0x40455f.0
mov eax, dword [ebx + 0x9c]
test eax, eax
jne 0x4048ac
mov cl, byte [ebp - 0x30]
and ecx, 0xf
mov dword [ebx + 0x9c], ecx
jmp 0x4048b3
dec eax
mov dword [ebx + 0x9c], eax
cmp dword [ebx + 0x9c], 0
je case.0x40455f.0
mov eax, dword [ebx + 0x98]
dec eax
mov edi, dword [ebp + 8]
mov dword [edi + 0x140], eax
jmp case.0x40455f.0
mov al, byte [ebx + 0xa2]
and al, 0xf
shl byte [ebp - 0x30], 4
or al, byte [ebp - 0x30]
mov byte [ebx + 0xa2], al
jmp case.0x40455f.0
movzx eax, byte [ebp - 0x30]
shl eax, 4
mov dword [ebx + 0x14], eax
or byte [ebx + 2], 4
jmp case.0x40455f.0
cmp byte [ebp - 0x30], 0
je 0x404917
mov dl, byte [ebp - 0x30]
mov byte [ebx + 0xa7], dl
movzx eax, byte [ebx + 0xa7]
add eax, dword [ebx + 0x10]
mov dword [ebx + 0x10], eax
cmp eax, 0x40
jle 0x404757
mov dword [ebx + 0x10], 0x40
jmp 0x404757
cmp byte [ebp - 0x30], 0
je 0x40494b
mov cl, byte [ebp - 0x30]
mov byte [ebx + 0xa7], cl
movzx eax, byte [ebx + 0xa7]
mov edi, dword [ebx + 0x10]
sub edi, eax
mov eax, edi
mov dword [ebx + 0x10], eax
test eax, eax
jge 0x404757
mov dword [ebx + 0x10], 0
jmp 0x404757
mov dword [ebx + 0x10], edi
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0xc], eax
mov edx, dword [ebp - 0x38]
mov dword [ebx + 0x14], edx
and byte [ebx + 2], 0xf0
jmp case.0x40455f.0
movzx eax, byte [ebp - 0x30]
mov ecx, dword [ebp + 8]
imul eax, dword [ecx + 0x138]
mov dword [ecx + 0x148], eax
jmp case.0x40455f.0
cmp byte [esi + 4], 0x1f
ja 0x4049bc
movzx eax, byte [esi + 4]
mov edi, dword [ebp + 8]
mov dword [edi + 0x138], eax
jmp case.0x40455f.0
add esp, 0xfffffff8
movzx eax, byte [esi + 4]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.004028c8
add esp, 0x10
jmp case.0x40455f.0
movzx eax, byte [esi + 4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x12c], eax
cmp eax, 0x40
jle 0x404757
mov dword [edx + 0x12c], 0x40
jmp 0x404757
mov al, byte [esi + 4]
test al, al
je case.0x40455f.0
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x130], al
jmp case.0x40455f.0
mov edi, dword [ebp - 0xc]
test byte [edi + 0x14c], 1
je case.0x40455f.0
xor ecx, ecx
movzx ax, byte [esi + 4]
mov word [ebp - 0x42], ax
add edi, 0xa4
mov edx, dword [ebp - 0xc]
cmp ax, word [edx + 0xa8]
jbe 0x404a72
movzx eax, byte [edx + 0x144]
mov dword [ebp - 0x54], eax
cmp ecx, eax
jge 0x404a72
mov eax, edx
add eax, 0xa8
mov esi, esi
add eax, 4
inc ecx
movzx edx, word [ebp - 0x42]
cmp dx, word [eax]
jbe 0x404a72
cmp ecx, dword [ebp - 0x54]
jl 0x404a60
mov dword [ebx + 0x2c], ecx
mov edx, dword [ebp - 0xc]
movzx eax, byte [edx + 0x144]
dec eax
cmp ecx, eax
jl 0x404a9c
shl eax, 2
or al, 2
movzx eax, word [eax + edi]
mov dword [ebx + 0x34], eax
mov byte [ebx + 0x3c], 1
jmp case.0x40455f.0
mov byte [ebx + 0x3c], 0
movzx eax, byte [esi + 4]
mov dword [ebx + 0x28], eax
lea eax, [ecx + 1]
movzx edx, word [edi + ecx*4]
mov dword [ebp - 0x40], edx
movzx edx, word [edi + eax*4]
shl ecx, 2
or ecx, 2
movzx ecx, word [ecx + edi]
shl ecx, 0x10
shl eax, 2
or al, 2
movzx eax, word [eax + edi]
shl eax, 0x10
sub edx, dword [ebp - 0x40]
je 0x404ae0
sub eax, ecx
mov edi, edx
cdq
idiv edi
mov dword [ebx + 0x38], eax
jmp 0x404ae7
mov dword [ebx + 0x38], 0
mov edx, dword [ebx + 0x28]
sub edx, dword [ebp - 0x40]
imul edx, dword [ebx + 0x38]
lea eax, [edx + ecx]
mov dword [ebx + 0x30], eax
sar eax, 0x10
mov dword [ebx + 0x34], eax
inc dword [ebx + 0x2c]
jmp case.0x40455f.0
mov al, byte [esi + 4]
test al, al
je case.0x40455f.0
mov byte [ebx + 0x7d], al
or byte [ebx + 2], 4
jmp case.0x40455f.0
cmp byte [esi + 4], 0
je case.0x40455f.0
mov al, byte [ebp - 0x11]
mov byte [ebx + 0x7e], al
mov dl, byte [ebp - 0x30]
mov byte [ebx + 0x7f], dl
jmp case.0x40455f.0
cmp byte [esi + 4], 0
je 0x404b48
mov cl, byte [ebp - 0x11]
inc cl
mov byte [ebx + 0x93], cl
mov al, byte [ebp - 0x30]
inc al
mov byte [ebx + 0x94], al
add esp, 0xfffffff4
push ebx
call fcn.00403e08
add esp, 0x10
jmp case.0x40455f.0
cmp byte [ebp - 0x11], 1
jne 0x404b74
cmp byte [ebp - 0x30], 0
je 0x404b6a
mov dl, byte [ebp - 0x30]
mov byte [ebx + 0x7b], dl
movzx eax, byte [ebx + 0x7b]
sub dword [ebx + 0xc], eax
jmp case.0x40455f.0
cmp byte [ebp - 0x11], 2
jne case.0x40455f.0
cmp byte [ebp - 0x30], 0
je 0x404b86
mov cl, byte [ebp - 0x30]
mov byte [ebx + 0x7a], cl
movzx eax, byte [ebx + 0x7a]
add dword [ebx + 0xc], eax
add esp, 0xfffffff8
mov edi, dword [ebp - 0xc]
push edi
push ebx
call fcn.004037d8
add esp, 0xfffffffc
mov eax, dword [ebp + 8]
push eax
mov edx, dword [ebp - 0x10]
push edx
push ebx
call fcn.00403e70
add esp, 0x20
inc dword [ebp - 8]
add esi, 5
mov ecx, dword [ebp + 8]
movsx eax, word [ecx + 0x14]
cmp dword [ebp - 8], eax
jl 0x404290
lea esp, [ebp - 0x78]
pop ebx
pop esi
pop edi
leave
ret