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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
and byte [ebp - 4], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x144]
or dword [edi + 0x150], 0xffffffff
or dword [edi + 0x14c], 0xffffffff
movzx edx, byte [eax + edi + 0x28]
movsx ecx, word [edi + 0x14]
mov eax, dword [edi + 0x140]
mov esi, dword [edi]
imul eax, ecx
lea ebx, [eax + eax*4]
add ebx, dword [esi + edx*8 + 4]
mov dword [ebp - 0x18], ebx
je 0x405073
and dword [ebp - 0x10], 0
test ecx, ecx
jle 0x405073
mov esi, dword [ebp - 0x10]
mov al, byte [ebx + 4]
imul esi, esi, 0xac
mov cl, al
shr cl, 4
and al, 0xf
mov byte [ebp - 1], cl
mov cl, al
mov al, byte [ebx + 3]
add esi, 0x407a60
cmp al, 3
mov byte [ebp - 3], cl
je 0x40493d
cmp al, 5
je 0x40493d
and byte [ebp - 2], 0
jmp 0x404941
mov byte [ebp - 2], 1
mov al, byte [ebx + 1]
test al, al
je 0x404953
cmp byte [ebp - 2], 0
jne 0x404953
dec al
mov byte [esi + 0x66], al
mov al, byte [ebx]
test al, al
je 0x404967
cmp al, 0xff
je 0x404967
cmp byte [ebp - 2], 0
jne 0x404967
dec al
mov byte [esi], al
movzx eax, byte [esi + 0x66]
movsx edx, word [edi + 0x20]
cmp eax, edx
jl 0x40498a
and dword [0x408fe0], 0
mov dword [ebp - 8], 0x409020
mov dword [ebp - 0xc], 0x408fe0
jmp 0x4049bd
imul eax, eax, 0x154
add eax, dword [edi + 4]
mov edx, eax
movzx eax, byte [esi]
mov al, byte [eax + edx + 0x44]
cmp al, 0x10
mov dword [ebp - 8], edx
jb 0x4049aa
mov edx, 0x408fe0
jmp 0x4049b1
movzx eax, al
mov edx, dword [edx + eax*4 + 4]
cmp byte [ebp - 2], 0
mov dword [ebp - 0xc], edx
jne 0x4049bd
mov dword [esi + 8], edx
cmp byte [esi + 0x6c], 7
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x24], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], edx
jne 0x4049e3
cmp byte [ebx + 3], 7
je 0x4049e3
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 0x404a51
cmp al, 0xff
je 0x404a51
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 0x404a2f
movzx ecx, cl
cdq
neg ecx
sub eax, edx
sar eax, 1
shl ecx, 6
sub ecx, eax
add ecx, 0x1e00
mov dword [esi + 0x68], ecx
jmp 0x404a3e
push eax
movzx eax, cl
push eax
call fcn.004044ff
pop ecx
pop ecx
mov dword [esi + 0x68], eax
cmp byte [ebp - 2], 0
jne 0x404a4a
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 0x404a73
push dword [ebp - 0xc]
push esi
call fcn.00404839
mov dl, byte [ebp - 1]
pop ecx
pop ecx
mov cl, byte [ebp - 3]
xor eax, eax
mov al, byte [ebx + 2]
test al, al
je 0x404a8b
push eax
push esi
call fcn.00404409
mov dl, byte [ebp - 1]
pop ecx
pop ecx
mov cl, byte [ebp - 3]
cmp byte [ebx], 0xff
je 0x404a96
cmp byte [ebx + 3], 0x14
jne 0x404a9a
mov byte [esi + 0x65], 1
mov eax, dword [ebp - 8]
mov al, byte [eax + 0x14c]
test al, 1
mov byte [ebp - 0x1c], al
je 0x404b0a
lea eax, [esi + 0x3c]
cmp byte [eax], 0
jne 0x404b14
push 2
lea ecx, [esi + 0x38]
push ecx
push eax
lea eax, [esi + 0x30]
push eax
xor ecx, ecx
lea eax, [esi + 0x34]
push eax
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x146]
push ecx
xor ecx, ecx
mov cl, byte [eax + 0x147]
push ecx
xor ecx, 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.00404316
mov cl, byte [ebp - 3]
mov dl, byte [ebp - 1]
add esp, 0x38
jmp 0x404b14
cmp byte [esi + 0x65], 0
je 0x404b14
and dword [esi + 0x34], 0
mov eax, dword [ebp - 8]
mov al, byte [eax + 0x14d]
test al, 1
mov byte [ebp - 0x20], al
je 0x404b82
lea eax, [esi + 0x54]
cmp byte [eax], 0
jne 0x404b82
push 4
lea ecx, [esi + 0x50]
push ecx
push eax
lea eax, [esi + 0x48]
push eax
xor ecx, ecx
lea eax, [esi + 0x4c]
push eax
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x149]
push ecx
xor ecx, ecx
mov cl, byte [eax + 0x14a]
push ecx
xor ecx, 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.00404316
mov cl, byte [ebp - 3]
mov dl, byte [ebp - 1]
add esp, 0x38
cmp byte [esi + 0x65], 0
je 0x404b9f
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x152]
sub dword [esi + 0x58], eax
jns 0x404b9b
and dword [esi + 0x58], 0
or byte [esi + 2], 2
movzx eax, byte [ebx + 3]
cmp eax, 0x15
jg 0x404fd0
je 0x404ee7
dec eax
cmp eax, 0x10
ja case.0x404d55.3
jmp dword [eax*4 + 0x405078]
mov al, byte [ebx + 4]
test al, al
je case.0x404d55.3
mov byte [esi + 0x79], al
jmp case.0x404d55.3
mov al, byte [ebx + 4]
test al, al
je case.0x404d55.3
mov byte [esi + 0x78], al
jmp case.0x404d55.3
mov al, byte [ebx + 4]
test al, al
je 0x404bf6
mov byte [esi + 0x84], al
mov eax, dword [esi + 0x68]
mov dword [esi + 0x80], eax
jmp 0x404c14
mov eax, dword [esi + 0x68]
mov dword [esi + 0x80], eax
mov al, byte [ebx + 4]
test al, al
je 0x404c14
mov byte [esi + 0x7c], al
and byte [esi + 2], 0xf6
jmp case.0x404d55.3
test dl, dl
je 0x404c27
mov byte [esi + 0x86], dl
test cl, cl
je 0x404c31
mov byte [esi + 0x87], cl
push esi
call fcn.00404093
jmp 0x405028
mov al, byte [ebx + 4]
test al, al
je 0x404c31
mov byte [esi + 0x7c], al
jmp 0x404c31
test dl, dl
je 0x404c52
mov byte [esi + 0x8a], dl
test cl, cl
je case.0x404d55.3
mov byte [esi + 0x8b], cl
jmp case.0x404d55.3
movzx eax, byte [ebx + 4]
jmp 0x404e13
mov al, byte [ebx + 4]
test al, al
je 0x404c7b
movzx eax, al
mov dword [esi + 0x70], eax
cmp dword [esi + 4], 0
je case.0x404d55.3
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0xc]
mov eax, dword [esi + 0x70]
add edx, dword [ecx + 8]
shl eax, 8
cmp eax, edx
jb 0x404ca7
mov al, byte [esi + 2]
and al, 0xf7
or al, 0x20
mov byte [esi + 2], al
jmp case.0x404d55.3
mov ecx, dword [esi + 4]
mov dword [ecx + 0x18], eax
jmp case.0x404d55.3
mov al, byte [ebx + 4]
test al, al
je case.0x404d55.3
mov byte [esi + 0x7c], al
jmp case.0x404d55.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 0x404ce9
and dword [edi + 0x150], 0
mov byte [ebp - 4], 1
jmp case.0x404d55.3
movzx eax, byte [ebx + 4]
jmp 0x404e37
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 0x404d19
and dword [edi + 0x14c], 0
cmp byte [ebp - 4], 0
jne 0x404d2c
mov eax, dword [edi + 0x144]
inc eax
mov dword [edi + 0x150], eax
movsx eax, word [edi + 0x10]
cmp dword [edi + 0x150], eax
jl case.0x404d55.3
and dword [edi + 0x150], 0
jmp case.0x404d55.3
movzx eax, dl
dec eax
cmp eax, 0xd
ja case.0x404d55.3
jmp dword [eax*4 + 0x4050bc]
test cl, cl
je 0x404d66
mov byte [esi + 0xa8], cl
movzx eax, byte [esi + 0xa8]
shl eax, 2
jmp 0x404ff2
test cl, cl
je 0x404d7f
mov byte [esi + 0xa9], cl
movzx eax, byte [esi + 0xa9]
shl eax, 2
add dword [esi + 0xc], eax
jmp case.0x404d55.3
lea eax, [esi + 0xa2]
mov dl, byte [eax]
and dl, 0xf0
or dl, cl
mov byte [eax], dl
jmp case.0x404d55.3
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x11], cl
jmp case.0x404d55.3
test cl, cl
jne 0x404dc5
mov eax, dword [edi + 0x140]
mov dword [esi + 0x98], eax
jmp case.0x404d55.3
lea eax, [esi + 0x9c]
mov edx, dword [eax]
test edx, edx
jne 0x404dd8
movzx ecx, cl
mov dword [eax], ecx
jmp 0x404ddb
dec edx
mov dword [eax], edx
cmp dword [eax], 0
je case.0x404d55.3
mov eax, dword [esi + 0x98]
dec eax
mov dword [edi + 0x140], eax
jmp case.0x404d55.3
lea eax, [esi + 0xa2]
mov dl, byte [eax]
shl cl, 4
and dl, 0xf
or cl, dl
mov byte [eax], cl
jmp case.0x404d55.3
movzx eax, cl
shl eax, 4
mov dword [esi + 0x14], eax
jmp 0x405043
test cl, cl
je 0x404e25
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 0x404e3a
mov dword [esi + 0x10], eax
or byte [esi + 2], 2
jmp case.0x404d55.3
test cl, cl
je 0x404e4d
mov byte [esi + 0xa7], cl
movzx eax, byte [esi + 0xa7]
sub dword [esi + 0x10], eax
jns 0x404e3a
and dword [esi + 0x10], 0
jmp 0x404e3a
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.0x404d55.3
movzx eax, cl
mov ecx, dword [edi + 0x138]
imul ecx, eax
mov dword [edi + 0x148], ecx
jmp case.0x404d55.3
mov al, byte [ebx + 4]
cmp al, 0x20
movzx eax, al
jae 0x404ea6
mov dword [edi + 0x138], eax
jmp case.0x404d55.3
push eax
push edi
call fcn.004034eb
pop ecx
jmp 0x405028
movzx ecx, byte [ebx + 4]
push 0x40
pop edx
cmp ecx, edx
lea eax, [edi + 0x12c]
mov dword [eax], ecx
jle 0x404e3a
mov dword [eax], edx
jmp 0x404e3a
mov al, byte [ebx + 4]
test al, al
je case.0x404d55.3
mov byte [edi + 0x130], al
jmp case.0x404d55.3
mov eax, dword [ebp - 8]
test byte [eax + 0x14c], 1
je case.0x404d55.3
mov edx, dword [ebp - 8]
movzx cx, byte [ebx + 4]
add edx, 0xa8
xor eax, eax
cmp cx, word [edx]
jbe 0x404f33
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 0x404f33
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x14]
inc eax
cmp cx, word [edx]
ja 0x404f18
mov ecx, dword [ebp - 8]
mov dword [esi + 0x2c], eax
movzx ecx, byte [ecx + 0x144]
lea edx, [ecx - 1]
cmp eax, edx
jl 0x404f5e
mov eax, dword [ebp - 8]
movzx eax, word [eax + ecx*4 + 0xa2]
mov dword [esi + 0x34], eax
mov byte [esi + 0x3c], 1
jmp case.0x404d55.3
and byte [esi + 0x3c], 0
mov ecx, dword [ebp - 0x18]
movzx ecx, byte [ecx + 4]
mov edx, dword [ebp - 8]
mov dword [esi + 0x28], ecx
movzx ecx, word [edx + eax*4 + 0xa4]
mov dword [ebp - 0x14], ecx
movzx ecx, word [edx + eax*4 + 0xa6]
lea ebx, [eax + 1]
movzx edi, word [edx + ebx*4 + 0xa4]
shl ecx, 0x10
sub edi, dword [ebp - 0x14]
je 0x404fac
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 0x404fb0
and dword [esi + 0x38], 0
mov eax, dword [esi + 0x28]
sub eax, dword [ebp - 0x14]
mov edi, dword [ebp + 8]
imul eax, dword [esi + 0x38]
add ecx, eax
mov dword [esi + 0x30], ecx
sar ecx, 0x10
mov dword [esi + 0x2c], ebx
mov ebx, dword [ebp - 0x18]
mov dword [esi + 0x34], ecx
jmp case.0x404d55.3
sub eax, 0x19
je 0x405039
dec eax
dec eax
je 0x40502b
dec eax
dec eax
je 0x40500c
sub eax, 4
jne case.0x404d55.3
cmp dl, 1
jne 0x404ff7
test cl, cl
je 0x404fee
mov byte [esi + 0x7b], cl
movzx eax, byte [esi + 0x7b]
sub dword [esi + 0xc], eax
jmp case.0x404d55.3
cmp dl, 2
jne case.0x404d55.3
test cl, cl
je 0x405003
mov byte [esi + 0x7a], cl
movzx eax, byte [esi + 0x7a]
jmp 0x404d89
cmp byte [ebx + 4], 0
je 0x405022
inc dl
inc cl
mov byte [esi + 0x93], dl
mov byte [esi + 0x94], cl
push esi
call fcn.004045de
pop ecx
jmp case.0x404d55.3
cmp byte [ebx + 4], 0
je case.0x404d55.3
mov byte [esi + 0x7e], dl
mov byte [esi + 0x7f], cl
jmp case.0x404d55.3
mov al, byte [ebx + 4]
test al, al
je case.0x404d55.3
mov byte [esi + 0x7d], al
or byte [esi + 2], 4
push dword [ebp - 8]
push esi
call fcn.00404133
push edi
push dword [ebp - 0xc]
push esi
call fcn.00404623
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 0x40490b
pop edi
pop esi
pop ebx
leave
ret