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

Disassembly:
sub esp, 0x40
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x48]
push ebx
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x5c]
push ebp
mov ebp, dword [esp + 0x4c]
push esi
mov dword [esp + 0x24], eax
mov eax, ebx
mov esi, edx
shr bx, 0xf
shr dx, 0xf
and esi, 0x7fff
push edi
mov edi, dword [esp + 0x6c]
and eax, 0x7fff
xor bl, dl
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x54], eax
mov byte [esp + 0x1c], bl
cmp esi, 0x7fff
jne 0x4701b9
mov edi, dword [esp + 0x5c]
mov esi, edi
and esi, 0x7fffffff
mov edx, ecx
or edx, esi
je 0x470188
mov edx, dword [esp + 0x68]
sub esp, 0x10
mov eax, esp
mov dword [eax], edx
mov edx, dword [esp + 0x7c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x80]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x84]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x74]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x80]
mov dword [eax + 4], edi
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
lea eax, [esp + 0x60]
call fcn.0046deb0
add esp, 0x20
jmp 0x47056d
cmp eax, 0x7fff
jne 0x47028e
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
mov edx, ebx
and edx, 0x7fffffff
mov eax, esi
or eax, edx
je 0x470272
sub esp, 0x10
mov eax, esp
mov dword [eax], esi
mov dword [eax + 4], ebx
jmp 0x470148
cmp eax, 0x7fff
jne 0x47024f
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
mov edx, edi
and edx, 0x7fffffff
mov eax, esi
or eax, edx
je 0x470241
mov edx, dword [esp + 0x70]
sub esp, 0x10
mov eax, esp
mov dword [eax], esi
mov dword [eax + 4], edi
mov dword [eax + 8], edx
mov edx, dword [esp + 0x84]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x70]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x7c]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
lea eax, [esp + 0x60]
call fcn.0046deb0
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [ebp], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp + 4], ecx
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], eax
add esp, 0x20
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
movsx dx, bl
xor eax, eax
xor ecx, ecx
shl dx, 0xf
jmp 0x4702aa
test eax, eax
jne 0x4702ec
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov edi, eax
or edi, edx
jne 0x4702cd
mov eax, esi
cdq
or edx, dword [esp + 0x5c]
or eax, ecx
or eax, edx
jne 0x470287
or byte [0x2611314], 1
xor eax, eax
mov ecx, 0xc0000000
mov edx, 0xffff
jmp 0x4702aa
or byte [0x2611314], 4
movsx dx, bl
mov esi, 0x8000
imul dx, si
mov esi, 0x7fff
xor eax, eax
mov ecx, 0x80000000
add dx, si
mov dword [ebp], eax
mov dword [ebp + 4], ecx
mov ecx, dword [esp + 0x74]
mov word [esp + 0x70], dx
mov eax, dword [esp + 0x70]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], ecx
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
lea ecx, [esp + 0x54]
push ecx
push edx
push eax
lea edi, [esp + 0x34]
call fcn.0046e620
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov edi, dword [esp + 0x38]
add esp, 0xc
test esi, esi
jne 0x47031d
mov eax, dword [esp + 0x5c]
mov edx, ecx
or edx, eax
je 0x470241
lea edx, [esp + 0x10]
push edx
push eax
push ecx
lea edi, [esp + 0x2c]
call fcn.0046e620
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x60]
mov edi, dword [esp + 0x38]
add esp, 0xc
mov ecx, dword [esp + 0x24]
sub esi, eax
add esi, 0x3ffe
mov dword [esp + 0x54], esi
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], esi
cmp edi, ecx
ja 0x47036a
mov eax, dword [esp + 0x20]
jb 0x470349
cmp dword [esp + 0x28], eax
ja 0x47036a
mov esi, eax
shrd eax, ecx, 1
shl esi, 0x1f
xor ebx, ebx
shr ecx, 1
inc dword [esp + 0x54]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push edi
push eax
push esi
push ebx
push ecx
push edx
call fcn.0046da80
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x5c]
push ecx
push edx
push eax
mov dword [esp + 0x5c], edx
mov edx, dword [esp + 0x50]
push edi
push edx
mov dword [esp + 0x60], eax
call fcn.0046d9a0
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x78]
push ecx
mov ecx, dword [esp + 0x78]
push edx
mov edx, dword [esp + 0x60]
push eax
mov eax, dword [esp + 0x60]
push ecx
push esi
push ebx
push edx
push eax
lea eax, [esp + 0x64]
call fcn.0046d860
add esp, 0x54
cmp dword [esp + 0x24], 0
jg 0x4704fd
jl 0x4703e9
cmp dword [esp + 0x20], 0
jae 0x4704fd
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
or eax, 0xffffffff
add dword [esp + 0x30], eax
mov ecx, esi
mov edx, ebx
adc dword [esp + 0x34], eax
add ecx, dword [esp + 0x28]
mov eax, ebx
adc eax, edi
mov dword [esp + 0x40], esi
mov esi, ecx
mov ebx, eax
cmp eax, edx
ja 0x470423
jb 0x47041c
cmp ecx, dword [esp + 0x40]
jae 0x470423
mov eax, 1
jmp 0x470425
xor eax, eax
xor ecx, ecx
add dword [esp + 0x20], eax
adc dword [esp + 0x24], ecx
js 0x4703f1
jg 0x470439
cmp dword [esp + 0x20], ecx
jb 0x4703f1
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x28]
push edi
push ecx
push 0
push 0
push ebx
push esi
call fcn.0046da80
add esp, 0x18
mov dword [esp + 0x24], edx
and edx, 0x7fffffff
mov dword [esp + 0x20], eax
mov dword [esp + 0x44], edx
ja 0x470547
jb 0x470478
cmp eax, 4
ja 0x470547
lea edx, [esp + 0x40]
push edx
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x3c]
push ecx
push edx
push eax
mov eax, dword [esp + 0x38]
push edi
push eax
call fcn.0046d9a0
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x58]
push edx
mov edx, dword [esp + 0x58]
push eax
push ecx
push edx
push 0
push 0
push ebx
push esi
lea eax, [esp + 0x74]
call fcn.0046d860
mov ebx, dword [esp + 0x4c]
add esp, 0x3c
cmp dword [esp + 0x14], 0
jg 0x47051e
jl 0x4704cf
test ebx, ebx
jae 0x47051e
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
or edx, 0xffffffff
add dword [esp + 0x20], edx
mov esi, ecx
adc dword [esp + 0x24], edx
add ecx, dword [esp + 0x28]
mov edx, eax
adc eax, edi
cmp eax, edx
ja 0x47050a
jb 0x4704f6
cmp ecx, esi
jae 0x47050a
mov edx, 1
jmp 0x47050c
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
jmp 0x470441
xor edx, edx
xor esi, esi
add ebx, edx
adc dword [esp + 0x14], esi
js 0x4704d7
jg 0x470526
test ebx, ebx
jb 0x4704d7
jmp 0x470526
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
or eax, dword [esp + 0x14]
or ecx, ebx
or ecx, eax
je 0x470537
mov eax, 1
jmp 0x470539
xor eax, eax
or dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
xor ecx, ecx
or dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
lea esi, [esp + 0x58]
call fcn.0046e660
add esp, 0x18
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp], ecx
mov ecx, dword [eax + 8]
mov dword [ebp + 4], edx
mov edx, dword [eax + 0xc]
pop edi
mov dword [ebp + 8], ecx
pop esi
mov dword [ebp + 0xc], edx
mov eax, ebp
pop ebp
pop ebx
add esp, 0x40
ret