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

Disassembly:
sub esp, 0x58
xor edx, edx
mov dword [esp + 0x18], edx
push ebx
mov dword [esp + 0x24], edx
push esi
mov dword [esp + 0x18], edx
push edi
mov dword [esp + 0x10], edx
push ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0x3c], 0xffffffff
mov ecx, dword [ebp + 0x28]
test ecx, ecx
je 0x46fc8b
mov eax, dword [esp + 0x74]
mov eax, dword [eax + 4]
test eax, eax
jge 0x46fc81
neg eax
cmp eax, 0x64
jl 0x46fc73
mov eax, 0x64
imul eax, ecx
mov ecx, 0x64
sub edx, edx
div ecx
jmp 0x46fc87
cmp eax, ecx
jb 0x46fc87
mov eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
mov eax, dword [eax + 0xc]
test eax, eax
mov dword [esp + 0x38], eax
jne 0x46fca2
mov dword [esp + 0x38], 0x800
mov eax, dword [esp + 0x74]
mov eax, dword [eax + 0x10]
test eax, eax
mov dword [esp + 0x34], eax
jne 0x46fcb9
mov dword [esp + 0x34], 0xffffffff
xor esi, esi
cmp dword [esp + 0x20], esi
je 0x4700e1
mov eax, dword [esp + 0x20]
push 0x8000
shl eax, 2
mov ecx, dword [ebp]
mov ebx, dword [esp + 0x70]
push eax
mov dword [esp + 0x20], esi
push ecx
push ebx
call fcn.004aab00
mov dword [esp + 0x34], eax
add esp, 0x10
cmp eax, esi
je 0x470100
mov ax, word [ebp + 0x2aa]
cmp ax, 1
jne 0x46fe2f
push esi
push ebp
push ebx
call fcn.00470360
add esp, 0xc
test ax, ax
jne 0x470109
cmp dword [ebp + 0x28], esi
jbe 0x46fd44
xor edi, edi
push 0
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax + edi]
push ecx
push ebp
push ebx
call fcn.0047ff90
add esp, 0x10
test ax, ax
jne 0x470109
add edi, 4
inc esi
cmp dword [ebp + 0x28], esi
ja 0x46fd1f
push 0x8000
mov eax, dword [ebp + 0x28]
shl eax, 2
mov ecx, dword [ebp]
push eax
push ecx
push ebx
call fcn.004aab00
mov dword [esp + 0x2c], eax
add esp, 0x10
test eax, eax
je 0x470100
mov ecx, dword [ebp + 0x28]
mov edi, eax
shl ecx, 2
mov esi, dword [ebp + 0x20]
shr ecx, 2
push 0x4706a0
rep movsd dword es:[edi], dword [esi]
push 4
mov eax, dword [ebp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
push ecx
push ebx
call fcn.004e12b0
mov dword [esp + 0x40], 0
add esp, 0x14
cmp dword [ebp + 0x28], 0
jbe 0x46fe01
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x20]
jae 0x46fe01
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x34], eax
jbe 0x46fe01
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x14]
push ecx
mov edi, dword [eax]
mov eax, dword [esp + 0x28]
push eax
push edi
push ebp
push ebx
call fcn.004702b0
add esp, 0x14
test al, al
jne 0x46fdef
mov dword [esi], edi
add esi, 4
mov eax, dword [edi + 0x20]
inc dword [esp + 0x14]
add dword [esp + 0x18], eax
add dword [esp + 0x40], 4
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x2c]
cmp dword [ebp + 0x28], eax
ja 0x46fdac
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp]
push eax
push ecx
push ebx
call fcn.004aad00
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x30]
add esp, 0xc
push 0x4706c0
push 4
push ecx
push edx
push ebx
call fcn.004e12b0
add esp, 0x14
jmp 0x46fea1
cmp ax, 2
jne 0x46fea1
xor esi, esi
mov dword [esp + 0x2c], esi
cmp dword [ebp + 0x28], esi
jbe 0x46fea1
mov eax, dword [esp + 0x24]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x20]
jae 0x46fea1
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x34], eax
jbe 0x46fea1
mov eax, dword [ebp + 0x20]
mov ecx, dword [esp + 0x14]
push ecx
mov edi, dword [eax + esi]
mov eax, dword [esp + 0x28]
push eax
push edi
push ebp
push ebx
call fcn.004702b0
add esp, 0x14
test al, al
jne 0x46fe91
mov eax, dword [esp + 0x40]
inc dword [esp + 0x14]
add dword [esp + 0x40], 4
mov dword [eax], edi
mov ecx, dword [edi + 0x20]
add dword [esp + 0x18], ecx
add esi, 4
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x2c]
cmp dword [ebp + 0x28], eax
ja 0x46fe48
cmp dword [esp + 0x14], 0
je 0x4700cf
xor edi, edi
mov eax, dword [esp + 0x74]
mov ecx, dword [eax + 0x14]
mov dword [esp + 0x18], ecx
cmp ecx, 3
jne 0x46fed0
mov eax, 0xc
cmp eax, dword [esp + 0x20]
sbb eax, eax
add eax, 2
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x28]
imul ax, ax, 0x14
push eax
mov edx, dword [ebp]
push ecx
push edx
push ebx
call fcn.0047f9e0
add esp, 0x10
test ax, ax
jne 0x470109
lea eax, [esp + 0x30]
push 0
push eax
mov ecx, dword [ebp]
push ecx
push ebx
call fcn.0047f7a0
add esp, 0x10
test ax, ax
jne 0x470109
mov eax, dword [esp + 0x74]
mov eax, dword [eax + 8]
test eax, eax
je 0x46ff56
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x46ff56
test eax, eax
jle 0x46ff31
cmp ecx, eax
mov edx, ecx
jb 0x46ff48
mov edx, eax
jmp 0x46ff48
mov eax, dword [esp + 0x20]
lea edx, [eax + eax*2]
cmp edx, ecx
jb 0x46ff3e
mov edx, ecx
cmp edx, 0x14
jb 0x46ff48
mov edx, 0x14
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4 - 4]
mov edx, dword [ecx + 0x10]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x2c], 0
cmp dword [esp + 0x14], 0
je 0x470040
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x12]
mov edx, dword [esp + 0x18]
push ecx
mov esi, dword [eax]
lea eax, [esp + 0x20]
push eax
push esi
push edi
push edx
push ebx
call fcn.004706e0
add esp, 0x18
mov edx, eax
test edx, edx
je 0x46fff7
lea edi, [esp + 0x40]
xor eax, eax
mov ecx, 0xa
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x12]
mov ecx, dword [esp + 0x30]
push eax
push edx
push ecx
push ebx
call fcn.0047f890
mov dword [esp + 0x58], eax
add esp, 0x10
test eax, eax
je 0x470109
mov cx, word [esp + 0x1c]
mov eax, dword [esp + 0x12]
and eax, 0xffff
lea edx, [esp + 0x40]
mov dword [esp + 0x4c], eax
push edx
mov word [esp + 0x5a], cx
mov eax, dword [esp + 0x2c]
push eax
push ebx
call fcn.0047faa0
add esp, 0xc
test ax, ax
jne 0x470109
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x78]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov al, byte [eax + 0x18]
push eax
push ecx
push esi
push ebp
push ebx
call fcn.00480230
add esp, 0x20
test ax, ax
jne 0x470109
mov edi, esi
mov eax, dword [esp + 0x14]
add dword [esp + 0x34], 4
inc dword [esp + 0x2c]
cmp dword [esp + 0x2c], eax
jb 0x46ff71
lea eax, [esp + 0x12]
lea ecx, [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
push ecx
push 0
push edi
push edx
push ebx
call fcn.004706e0
add esp, 0x18
mov edx, eax
test edx, edx
je 0x4700b9
lea edi, [esp + 0x40]
xor eax, eax
mov ecx, 0xa
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x12]
mov ecx, dword [esp + 0x30]
push eax
push edx
push ecx
push ebx
call fcn.0047f890
mov dword [esp + 0x58], eax
add esp, 0x10
test eax, eax
je 0x470109
mov cx, word [esp + 0x1c]
mov eax, dword [esp + 0x12]
and eax, 0xffff
lea edx, [esp + 0x40]
mov dword [esp + 0x4c], eax
push edx
mov word [esp + 0x5a], cx
mov eax, dword [esp + 0x2c]
push eax
push ebx
call fcn.0047faa0
add esp, 0xc
test ax, ax
jne 0x470109
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x78]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov ax, word [eax + 0xa]
mov word [ecx + 8], ax
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp]
push eax
push ecx
push ebx
call fcn.004aad00
add esp, 0xc
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword [ebp + 0x294], eax
mov dword [ebp + 0x290], ecx
xor ax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x58
ret
push ebx
call fcn.0046ee40
add esp, 4
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp]
push eax
push ecx
push ebx
call fcn.004aad00
add esp, 0xc
cmp dword [esp + 0x28], 0
je 0x470130
mov eax, dword [esp + 0x28]
push eax
push ebx
call fcn.0047fa70
add esp, 8
cmp dword [esp + 0x30], 0
je 0x470145
mov eax, dword [esp + 0x30]
push eax
push ebx
call fcn.0047f800
add esp, 8
mov ax, 0xfffe
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x58
ret