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

Disassembly:
push 0xffffffffffffffff
push 0x4c9d30
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x521da0]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov eax, dword [esp + 0x7c]
mov edi, ecx
mov dword [esp + 0x3c], eax
mov ecx, dword [edi + 0x4d8]
mov ebp, dword [edi + 0x1c4]
mov eax, 0x55555556
imul ecx
mov eax, dword [edi + 0x1c8]
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x74]
cdq
sub eax, edx
xor ebx, ebx
sar eax, 1
add ebp, 3
cmp eax, dword [esp + 0x5c]
mov dword [esp + 0x50], ebx
jg 0x46a6f5
mov ecx, dword [edi + 0x4d4]
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
add ebp, eax
mov edx, dword [edi + 0x9b8]
mov eax, dword [edi + 0x16c]
mov edx, dword [edx + 0x28]
lea esi, [edi + 0x9b8]
push eax
mov ecx, esi
call edx
mov ecx, dword [edi + 0x20]
mov eax, dword [esi]
mov edx, dword [eax + 0x30]
push ecx
mov ecx, esi
call edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ebx
xor eax, eax
mov ecx, 1
mov word [esp + 0x2e], cx
xor ecx, ecx
mov word [esp + 0x2c], ax
xor edx, edx
mov word [esp + 0x32], ax
mov word [esp + 0x38], ax
mov eax, dword [esp + 0x74]
mov word [esp + 0x34], cx
xor esi, esi
cmp eax, ebx
mov ecx, 1
mov byte [esp + 0x50], 1
mov word [esp + 0x30], dx
mov word [esp + 0x36], dx
mov word [esp + 0x3a], cx
mov dword [esp + 0x44], eax
mov dword [esp + 0x14], esi
jle 0x46a89b
mov dword [esp + 0x18], ebp
jmp 0x46a78d
mov eax, dword [esp + 0x74]
mov esi, dword [esp + 0x14]
cmp esi, eax
jbe 0x46a79a
call fcn.00496353
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x64]
mov ebp, 0x10
cmp dword [esp + 0x78], ebp
jae 0x46a7ad
lea ecx, [esp + 0x64]
mov bl, byte [ecx + esi]
inc esi
cmp esi, eax
jbe 0x46a7ba
call fcn.00496353
mov eax, dword [esp + 0x64]
cmp dword [esp + 0x78], ebp
jae 0x46a7c8
lea eax, [esp + 0x64]
mov al, byte [esi + eax]
movsx esi, bl
movsx edx, al
and esi, 0xff
and edx, 0xff
shl esi, 8
push 0x14
or esi, edx
call fcn.00485167
mov ecx, dword [edi + 0x9bc]
add esp, 4
mov ebp, eax
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push ebp
push 4
push esi
push ecx
mov dword [esp + 0x44], ebp
call dword [0x4ce0c4]
mov ebx, eax
test ebx, ebx
je 0x46a846
push ebx
call fcn.00497d4f
push ebx
push 0
push eax
mov dword [esp + 0x30], eax
call fcn.00495e20
mov eax, dword [esp + 0x30]
mov ecx, dword [edi + 0x9bc]
add esp, 0x10
lea edx, [esp + 0x2c]
push edx
push eax
push ebx
push ebp
push 4
push esi
push ecx
call dword [0x4ce0c4]
jmp 0x46a84e
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0x1c]
push edx
push eax
push esi
push ecx
push 0
mov ecx, edi
call fcn.004691f0
push ebp
call fcn.00485196
mov edx, dword [esp + 0x24]
push edx
call fcn.00497e19
mov eax, dword [esp + 0x1c]
add esi, dword [esp + 0x60]
add eax, 2
add esp, 8
cmp eax, dword [esp + 0x44]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
jl 0x46a785
cmp dword [esp + 0x78], 0x10
jb 0x46a8af
mov eax, dword [esp + 0x64]
push eax
call fcn.00485196
add esp, 4
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 0x28