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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xbc
mov edi, ecx
mov ecx, dword [esp + 0xdc]
mov esi, dword [esp + 0xe0]
mov eax, dword [0x50302c]
xor eax, esp
mov dword [esp + 0xb8], eax
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
xor ebx, ebx
mov eax, esi
and eax, 3
setne bl
add ebx, 1
imul ebx, dword [edi + 0x20]
mov dword [esp + 0x14], ecx
shr ecx, 0x16
and cl, 1
mov dword [esp + 0x20], ebx
shl ebx, cl
mov dword [esp + 0x28], ebx
and esi, 3
je 0x408dc2
lea eax, [edx + edx]
mov ecx, dword [edi + 0xb8c]
cmp eax, dword [ecx + 0x12c]
jge 0x409dd7
mov ebx, dword [esp + 0xd0]
mov eax, dword [edi + 0x24]
mov dword [esp + 4], 0
test dword [esp + 0xdc], 0x40000000
jne 0x408deb
mov dword [esp + 0xc], 0
jmp 0x408e3b
cmp dword [edi + 0xb90], 0
je 0x408e03
mov ecx, dword [edi + 0xb8c]
cmp byte [ecx + 0x142], 0
je 0x408de1
lea ecx, [esp + 0xe4]
mov ebp, dword [0x4c78b4]
mov dword [ecx + 4], ebp
mov ebp, ecx
mov ecx, dword [0x4c78b4]
mov dword [ebp], ecx
mov ecx, dword [esp + 0xdc]
and ecx, 0xfecc0000
or ecx, 0x20b04
mov dword [esp + 0x14], ecx
mov cl, 1
mov dword [esp + 0xc], ecx
mov ebp, dword [esp + 0x20]
imul ebp, edx
mov ecx, ebp
imul ebx, eax
mov ebp, dword [esp + 0xd4]
mov dword [esp + 0x18], 1
test esi, esi
je 0x408e63
cmp dword [edi + 0xb94], 3
je 0x408e88
test esi, esi
je 0x408e76
cmp esi, 1
jne 0x408e7c
mov dword [esp + 4], 4
jmp 0x408e88
mov dword [esp + 4], esi
jmp 0x408e84
mov dword [esp + 4], 0xc
mov dword [esp + 0x18], esi
add ecx, dword [edi + 0x2c]
mov dword [esp + 0x20], ecx
mov dword [esp], edi
add ebx, dword [edi + 0x30]
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x14]
shr ebx, 0x13
mov esi, ebx
and esi, 0x10
movzx ecx, word [ebp]
mov edx, ecx
add edx, 0xffffdc46
mov dword [esp + 8], 0
cmp dx, 3
ja 0x408ed7
add cl, 0x46
cmp cl, 3
ja case.default.0x408eca
movzx ecx, cl
jmp dword [ecx*4 + 0x4c776c]
add eax, eax
neg eax
jmp case.0x408eca.68
mov dword [esp + 0x40], 0
jmp 0x408f27
xor edx, edx
jmp 0x408efe
mov ecx, 0x99999999
jmp 0x408ef3
add eax, eax
mov ecx, 0x66666667
imul ecx
mov eax, edx
shr eax, 0x1f
sar edx, 1
add edx, eax
mov ecx, dword [esp + 0x18]
shr ecx, 1
shl edx, cl
mov dword [esp + 0x40], edx
mov eax, dword [esp]
movzx ecx, word [eax + 0x74a]
mov word [ebp], cx
and dword [esp + 0x14], 0xfff7ffff
and bl, 1
mov dword [esp + 8], ebx
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + 4]
or eax, esi
mov esi, eax
mov eax, ecx
and eax, 0xfc00
cmp eax, 0xd800
jne 0x408f61
cmp edx, 2
mov ebx, dword [esp]
jl 0x408f69
movzx eax, word [ebp + 2]
and eax, 0xfc00
cmp eax, 0xdc00
jne 0x408f6e
jmp 0x408fe1
mov ebx, dword [esp]
jmp 0x408fe1
cmp edx, 1
jne 0x408fe1
mov eax, dword [esp + 0xd8]
lea edx, [eax - 1]
and eax, 7
xor ecx, ecx
cmp edx, 7
jb 0x408fb7
mov edx, dword [esp + 0xd8]
and edx, 0xfffffff8
xor ecx, ecx
nop
nop
mov dword [ebp + ecx*2], 0xfffdfffd
mov dword [ebp + ecx*2 + 4], 0xfffdfffd
mov dword [ebp + ecx*2 + 8], 0xfffdfffd
mov dword [ebp + ecx*2 + 0xc], 0xfffdfffd
add ecx, 8
cmp edx, ecx
jne 0x408f90
test eax, eax
je 0x408fdd
lea ecx, [ecx*2]
add ecx, ebp
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx + edx*2], 0xfffd
add edx, 1
cmp eax, edx
jne 0x408fd0
movzx ecx, word [ebp]
and ecx, 0xff00
mov eax, esi
or eax, 0x20
cmp ecx, 0xdc00
cmovne eax, esi
mov esi, dword [esp + 0x14]
mov ecx, esi
and ecx, 0x1ff
mov dword [esp + 4], ecx
mov ebp, esi
shr ebp, 9
and ebp, 0x1ff
cmp dword [ebx + 0xd14], 2
sete cl
mov edx, esi
shr edx, 0x12
and dl, cl
movzx ecx, dl
or ecx, eax
mov ebx, ecx
or ebx, 2
mov eax, dword [esp]
cmp dword [eax + 0xd1c], 1
cmovne ebx, ecx
test esi, 0x80000
cmove ebx, ecx
mov ecx, dword [esp]
mov edx, ebx
call fcn.00409df0
invalid