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

Disassembly:
and al, 0x5c
mov dword [esp + 0x60], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ecx
mov dword [esp + 0x48], ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x474160
sub eax, edx
add eax, ebx
lea edx, [esp + 0x98]
mov dword [esp + 0x20], edx
mov dword [esp + 0x4c], eax
xor eax, eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x3c]
push edx
push eax
push eax
push eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x70], eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x48]
push edx
mov eax, edi
and eax, 7
push eax
lea esi, [ebx + ebp]
push edi
mov dword [esp + 0xa8], edi
mov dword [esp + 0x50], esi
mov byte [esp + 0xcc], 0x5e
call fcn.00473460
mov eax, dword [esp + 0x48]
add esp, 0x34
test eax, eax
jne fcn.004744ae
mov edi, dword [esp + 0x18]
cmp edi, 0x10000
jle 0x4741fc
mov eax, 0x14
jmp fcn.004744ae
mov ecx, dword [esp + 0x60]
add ecx, 3
imul ecx, dword [esp + 0x5c]
lea ebx, [ecx + edi + 0x28]
push ebx
call dword [0x4bd358]
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x474224
lea eax, [ebp + 0x15]
jmp 0x4744a7
mov dword [ebp + 4], ebx
mov dword [ebp], 0x50435245
mov edx, dword [esp + 0x74]
mov dword [ebp + 8], edx
movzx eax, word [esp + 0x78]
mov word [ebp + 0xc], ax
xor edx, edx
mov dword [ebp + 0x14], edx
xor ecx, ecx
mov word [ebp + 0xe], cx
mov ecx, 0x28
mov word [ebp + 0x18], cx
movzx edx, word [esp + 0x60]
mov word [ebp + 0x1a], dx
movzx eax, word [esp + 0x5c]
xor ecx, ecx
mov word [ebp + 0x1c], ax
mov word [ebp + 0x1e], cx
mov dword [ebp + 0x20], ecx
mov dword [ebp + 0x24], ecx
mov edx, dword [esp + 0x64]
mov dword [esp + 0x68], edx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x5c], ecx
movzx eax, word [ebp + 0x18]
push ecx
add eax, ebp
mov dword [esp + 0x5c], eax
movzx edx, word [ebp + 0x1a]
movzx ebx, word [ebp + 0x1c]
imul ebx, edx
lea edx, [esp + 0x34]
push edx
push ecx
lea edx, [esp + 0x30]
push edx
lea edx, [esp + 0x3c]
push edx
push ecx
push ecx
push ecx
add ebx, eax
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], ecx
mov dword [esp + 0xa4], ecx
mov dword [esp + 0x70], ecx
lea eax, [esp + 0xb8]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x74], eax
lea ecx, [esp + 0x34]
push ecx
mov byte [ebx], 0x5e
mov eax, dword [ebp + 8]
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x48]
mov edx, eax
push ecx
and edx, 7
push edx
push eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], ebx
call fcn.00473460
movzx eax, word [esp + 0x98]
mov word [ebp + 0x10], ax
mov cx, word [esp + 0xa0]
mov word [ebp + 0x12], cx
movzx edx, word [esp + 0xac]
add esp, 0x34
mov word [ebp + 0xc], dx
cmp dword [esp + 0x80], 0
je 0x474335
mov dword [esp + 0x24], 0xffffffff
cmp dword [esp + 0x14], 0
jne 0x47434d
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0
je 0x47434d
mov dword [esp + 0x14], 0x16
mov eax, dword [esp + 0x20]
mov byte [eax], 0
inc eax
sub eax, ebx
cmp eax, edi
jle 0x474368
mov dword [esp + 0x14], 0x17
jmp 0x4743ef
cmp dword [esp + 0x14], 0
jne 0x4743ef
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x98]
cmp ecx, edx
jbe 0x4743dd
mov edi, dword [esp + 0x28]
sub ecx, 2
mov dword [esp + 0x54], ecx
movzx eax, byte [ecx + 1]
movzx ecx, byte [ecx]
shl ecx, 8
or eax, ecx
movzx esi, byte [eax + ebx]
movzx edx, byte [eax + ebx + 1]
mov dword [esp + 0x18], eax
shl esi, 8
or esi, edx
mov eax, ebx
call fcn.0046dd10
test eax, eax
je 0x4743d3
mov esi, dword [esp + 0x18]
mov ecx, eax
sub ecx, ebx
sar ecx, 8
sub al, bl
mov byte [esi + ebx], cl
mov byte [esi + ebx + 1], al
cmp dword [esp + 0x14], 0
je 0x474373
jmp 0x4743ef
mov dword [esp + 0x14], 0x35
jmp 0x4743ef
mov dx, word [ebp + 0x12]
cmp dx, word [ebp + 0x10]
jbe 0x4743ef
mov dword [esp + 0x14], 0xf
cmp dword [esp + 0x84], 0
je 0x474492
mov edi, dword [esp + 0x28]
or esi, 0xffffffff
mov eax, ebx
call fcn.0046dd10
mov esi, eax
test esi, esi
je 0x474492
movzx eax, byte [esi + 1]
movzx ecx, byte [esi + 2]
shl eax, 8
or eax, ecx
jne 0x47446a
movzx edx, byte [esi - 2]
movzx eax, byte [esi - 1]
shl edx, 8
or edx, eax
movzx ecx, byte [edx + esi - 3]
lea edi, [edx + esi - 3]
lea edx, [esp + 0x30]
push edx
mov byte [edi], 0
mov eax, dword [ebp + 8]
push 1
push eax
push esi
mov dword [esp + 0x28], ecx
call fcn.0046da00
mov cl, byte [esp + 0x28]
add esp, 0x10
mov byte [edi], cl
test eax, eax
js 0x474481
mov edx, eax
sar edx, 8
mov byte [esi + 1], dl
mov byte [esi + 2], al
mov edi, dword [esp + 0x28]
lea eax, [esi + 3]
or esi, 0xffffffff
call fcn.0046dd10
mov esi, eax
test esi, esi
jne 0x474415
jmp 0x474492
sub eax, 0xfffffffe
neg eax
sbb eax, eax
and eax, 0xfffffff5
add eax, 0x24
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
je 0x474502
push ebp
call dword [0x4bd35c]
mov eax, dword [esp + 0x18]
add esp, 4
mov ebx, dword [esp + 0x109c]
mov eax, dword [ebp + 8]
test al, 0x10
jne 0x47458d
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x70]
push eax
push 0
lea ecx, [esp + 0x20]
push ecx
push ebx
call fcn.00473840
add esp, 0x10
test eax, eax
je 0x474530
or dword [ebp + 8], 0x10
jmp 0x47458d
mov eax, dword [esp + 0x2c]
test eax, eax
jns 0x47454c
push 0
lea edx, [esp + 0x1c]
push edx
push ebx
call fcn.00473c50
add esp, 0xc
test eax, eax
js 0x474574
mov ecx, eax
and ecx, 0xff
test eax, 0x100
je 0x474569
mov edx, dword [esp + 0x34]
movzx edx, byte [edx + ecx]
cmp edx, ecx
jne 0x474569
mov eax, ecx
or word [ebp + 0xc], 2
mov word [ebp + 0x14], ax
jmp 0x47458d
mov eax, dword [esp + 0x70]
push eax
push 0
push ebx
call fcn.004739e0
add esp, 0xc
test eax, eax
je 0x47458d
or word [ebp + 0xc], 8
mov eax, dword [esp + 0x24]
test eax, eax
js 0x4745cb
test byte [ebp + 8], 0x10
je 0x4745a2
test eax, 0x200
je 0x4745cb
mov ecx, eax
and ecx, 0xff
test eax, 0x100
je 0x4745c2
mov edx, dword [esp + 0x34]
movzx edx, byte [edx + ecx]
cmp edx, ecx
jne 0x4745c2
and eax, 0xfffffeff
or word [ebp + 0xc], 4
mov word [ebp + 0x16], ax
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x1088
ret