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

Disassembly:
mov ecx, dword [0x5efcb0]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x4ad16b
sub esp, 0x58
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x30], 0
jmp 0x4ace49
mov edx, dword [esp + 0x60]
mov dword [esp + 0x34], edx
cmp dword [esp + 0x30], edx
jl 0x4ace5c
jmp 0x4ad0fa
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
cmp ecx, eax
jae 0x4ace71
jmp 0x4ad165
sub ecx, eax
mov ebx, ecx
neg ecx
sar ecx, 0x1f
and eax, ecx
add eax, edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ebx
mov dword [esp], eax
mov dword [esp + 4], ebx
call fcn.004830a0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
cmp eax, 0xfffd
je 0x4acebe
jmp 0x4ad0a9
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
cmp eax, ecx
jbe 0x4aced3
jmp 0x4ad160
sub ecx, eax
mov ebx, ecx
neg ecx
sar ecx, 0x1f
and eax, ecx
add edx, eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x40], ebx
cmp ebx, 3
setge dl
mov byte [esp + 0x21], dl
jge 0x4acefa
jmp 0x4acf17
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
test ecx, ecx
ja 0x4acf0b
jmp 0x4ad159
cmp byte [edx], 0xed
sete dl
mov byte [esp + 0x21], dl
jmp 0x4acf19
jmp 0x4acf19
movzx edx, byte [esp + 0x21]
mov byte [esp + 0x22], dl
test dl, dl
jne 0x4acf28
jmp 0x4acf47
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
cmp ecx, 1
ja 0x4acf3a
jmp 0x4ad14f
cmp byte [edx + 1], 0xa0
setae dl
mov byte [esp + 0x22], dl
jmp 0x4acf49
jmp 0x4acf49
movzx edx, byte [esp + 0x22]
mov byte [esp + 0x23], dl
test dl, dl
jne 0x4acf58
jmp 0x4acf77
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
cmp ecx, 1
ja 0x4acf6a
jmp 0x4ad145
cmp byte [edx + 1], 0xbf
setbe dl
mov byte [esp + 0x23], dl
jmp 0x4acf79
jmp 0x4acf79
movzx edx, byte [esp + 0x23]
mov byte [esp + 0x24], dl
test dl, dl
jne 0x4acf88
jmp 0x4acfa7
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
cmp ecx, 2
ja 0x4acf9a
jmp 0x4ad13b
cmp byte [edx + 2], 0x80
setae dl
mov byte [esp + 0x24], dl
jmp 0x4acfa9
jmp 0x4acfa9
movzx edx, byte [esp + 0x24]
mov byte [esp + 0x25], dl
test dl, dl
jne 0x4acfb8
jmp 0x4acfd7
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
cmp ecx, 2
ja 0x4acfca
jmp 0x4ad131
cmp byte [edx + 2], 0xbf
setbe dl
mov byte [esp + 0x25], dl
jmp 0x4acfd9
jmp 0x4acfd9
movzx edx, byte [esp + 0x25]
test dl, dl
jne 0x4acfe7
jmp 0x4ad0a7
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
test ecx, ecx
ja 0x4acff8
jmp 0x4ad12a
movzx edx, byte [edx]
and edx, 0xf
shl edx, 0xc
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
cmp ecx, 1
ja 0x4ad013
jmp 0x4ad120
movzx ebx, byte [ebx + 1]
and ebx, 0x3f
shl ebx, 6
add edx, ebx
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
cmp ecx, 2
ja 0x4ad031
jmp 0x4ad116
movzx ebx, byte [ebx + 2]
and ebx, 0x3f
add edx, ebx
mov dword [esp + 0x2c], edx
mov word [esp + 0x26], dx
mov edx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x68]
inc ebp
cmp edx, ebp
jae 0x4ad056
jmp 0x4ad058
jmp 0x4ad088
mov dword [esp], ebx
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
mov dword [esp + 0xc], 1
lea eax, [0x5116e0]
mov dword [esp + 0x10], eax
call fcn.00471230
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
jmp 0x4ad088
lea esi, [ebx + ebp*2 - 2]
movzx edi, word [esp + 0x26]
mov word [esi], di
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], edx
add dword [esp + 0x30], 3
jmp 0x4ad0f5
jmp 0x4ad0ab
jmp 0x4ad0ab
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
mov ebx, dword [esp + 0x6c]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
call fcn.004a6360
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], edx
jmp 0x4ad0f5
jmp 0x4ace49
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edx
add esp, 0x58
ret
mov eax, 2
call fcn.00475830
mov eax, 1
call fcn.00475830
xor eax, eax
call fcn.00475830
mov eax, 2
call fcn.00475830
mov eax, 2
call fcn.00475830
mov eax, 1
call fcn.00475830
mov eax, 1
call fcn.00475830
xor eax, eax
call fcn.00475830
call fcn.00475890
call fcn.00475890
nop
call fcn.004743b0
jmp fcn.004ace10