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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
mov ebp, dword [esp + 0x4c]
push esi
push edi
mov edi, dword [esp + 0x58]
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
lea edi, [edi + edi*4]
mov dword [esp + 0x34], eax
mov ebx, dword [eax]
mov eax, dword [ebp + 0x20]
shl edi, 3
mov dword [esp + 0x38], edi
add edi, eax
push 0x170
push ebx
mov eax, dword [edi]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], ecx
call fcn.004451d0
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x10], esi
mov dword [edi + 0xc], esi
je 0x486a04
mov al, byte [edi + 0x12]
or al, 0x10
mov byte [edi + 0x12], al
mov dx, word [ebp + 0x16]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp]
push edx
push eax
push ecx
push esi
call fcn.00485720
mov edx, dword [esp + 0x38]
push 0x44
push edx
push esi
call fcn.00485760
mov eax, dword [esp + 0x6c]
push esi
push eax
call fcn.004858f0
mov al, byte [ebx + 0x38]
add esp, 0x24
test al, al
jne 0x486a04
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov ebx, dword [esi + 0x18]
mov edi, dword [esi + 0x20]
or eax, 0xffffffff
dec ebx
not ecx
not edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x24], ebx
js 0x4867fa
jmp 0x486641
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov ecx, eax
or ecx, edx
je 0x4867f2
mov al, byte [edi + 0x10]
test al, al
jne 0x48674a
mov edx, dword [esp + 0x18]
xor eax, eax
push 0x168
push edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
call fcn.004402d0
mov esi, eax
add esp, 8
test esi, esi
je 0x4867d0
mov dl, byte [edi + 0x12]
mov ebp, dword [esp + 0x54]
mov ecx, dword [esp + 0x14]
or dl, 0x20
mov dword [edi + 0xc], esi
mov byte [edi + 0x12], dl
mov word [edi + 0x10], 0x200
mov ax, word [ebp + 0x16]
mov edx, dword [ebp]
push eax
push ecx
xor ebx, ebx
push edx
push esi
mov dword [esp + 0x58], ebx
call fcn.00485720
mov eax, dword [edi]
push 0x45
push eax
push esi
call fcn.00485760
mov ecx, dword [esp + 0x6c]
push esi
push ecx
call fcn.004858f0
mov edx, dword [esp + 0x3c]
mov dword [esi + 0x10], ebp
add esp, 0x24
mov al, byte [edx + 0x38]
test al, al
jne 0x486729
mov eax, dword [esi + 0x18]
mov ebp, dword [esi + 0x20]
test eax, eax
mov dword [esp + 0x20], ebx
jle 0x486729
mov eax, dword [ebp]
xor ecx, ecx
mov cl, byte [eax]
push ecx
call fcn.00486130
add esp, 4
test eax, eax
je 0x486716
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x14]
push edx
push eax
call fcn.00485890
or ebx, eax
mov eax, dword [esp + 0x50]
add esp, 8
or eax, edx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x18]
inc eax
add ebp, 0x28
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x4866e5
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
and ecx, ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x48]
and eax, ecx
mov dword [esp + 0x30], eax
jmp 0x4867cc
test byte [edi + 0x12], 8
jne 0x4867d4
mov edx, dword [edi + 8]
mov eax, dword [esp + 0x14]
push edx
push eax
call fcn.00485890
mov esi, eax
mov al, byte [edi + 0x12]
add esp, 8
mov ebp, edx
test al, 2
je 0x486795
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x10]
lea ecx, [eax + eax*4]
mov eax, dword [edx + 0x20]
mov edx, dword [esp + 0x14]
lea eax, [eax + ecx*8]
mov ecx, dword [eax + 8]
push ecx
push edx
call fcn.00485890
add esp, 8
or esi, eax
or ebp, edx
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
and edx, esi
and ecx, ebp
cmp word [edi + 0x10], 2
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ecx
je 0x4867b8
xor eax, eax
mov dword [esp + 0x3c], eax
jmp 0x4867c8
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
and ecx, esi
and eax, ebp
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
mov ebp, dword [esp + 0x54]
mov esi, dword [esp + 0x10]
dec ebx
add edi, 0x28
test ebx, ebx
mov dword [esp + 0x24], ebx
jge 0x48663d
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
jmp 0x4867fa
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x30]
mov dword [esi + 0x168], eax
or eax, edi
mov dword [esi + 0x16c], edi
jne 0x486812
xor eax, eax
jmp 0x486817
mov eax, 0x100
mov edi, dword [esp + 0x1c]
or ecx, edx
mov word [edi + 0x10], ax
je 0x486a04
xor ebx, ebx
or edi, 0xffffffff
mov dword [esp + 0x20], ebx
jmp 0x48683e
mov ebp, dword [esp + 0x54]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
test ebx, ebx
jne 0x486932
mov eax, dword [esp + 0x10]
mov esi, dword [esi + 0x20]
mov ebp, dword [eax + 0x18]
dec ebp
js 0x486a04
mov cl, byte [esi + 0x12]
mov eax, dword [esi + 8]
and cl, 0xbf
cmp eax, edi
mov byte [esi + 0x12], cl
je 0x486887
mov edx, dword [esp + 0x14]
mov ecx, eax
push ecx
push edx
call fcn.00485890
mov ecx, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
and eax, ecx
and edx, ebx
add esp, 8
or eax, edx
jne 0x486895
dec ebp
add esi, 0x28
test ebp, ebp
jl 0x486a04
jmp 0x486857
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
test ebp, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], ecx
jl 0x486a04
mov ebx, 1
test ebx, ebx
je 0x486910
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 8]
cmp eax, edx
je 0x4868c6
mov al, byte [esi + 0x12]
and al, 0xbf
jmp 0x486905
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0xc]
cmp ecx, eax
je 0x4868d5
xor ebx, ebx
jmp 0x486908
mov ecx, dword [esi]
mov edx, dword [ecx + 0xc]
push edx
call fcn.0046e780
movsx edi, al
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push ecx
call fcn.0046e780
add esp, 8
test edi, edi
movsx eax, al
je 0x486900
cmp edi, eax
je 0x486900
xor ebx, ebx
jmp 0x486908
mov al, byte [esi + 0x12]
or al, 0x40
mov byte [esi + 0x12], al
dec ebp
add esi, 0x28
test ebp, ebp
jge 0x4868b0
mov eax, dword [esp + 0x20]
inc eax
cmp eax, 2
mov dword [esp + 0x20], eax
jl 0x486832
test ebx, ebx
je 0x486a04
mov ebp, dword [esp + 0x54]
mov esi, dword [esp + 0x10]
mov ecx, dword [esi + 0x18]
mov esi, dword [esi + 0x20]
xor edi, edi
xor eax, eax
dec ecx
js 0x486975
lea ebx, [ecx + 1]
test byte [esi + 0x12], 0x40
je 0x48696f
mov edx, dword [esi]
mov ecx, dword [esp + 0x18]
push 0
mov eax, dword [edx + 0xc]
push eax
push ecx
call fcn.00471920
mov edx, dword [ebp]
push eax
push edi
push edx
call fcn.0046bd60
mov edi, eax
mov eax, dword [esi]
add esp, 0x18
mov eax, dword [eax + 8]
add esi, 0x28
dec ebx
jne 0x486942
mov ebx, dword [esp + 0x18]
push 0
push eax
push ebx
call fcn.00471920
mov ecx, dword [esp + 0x40]
push 0
push 0
push eax
push 0x48
push ecx
call fcn.0046b950
mov esi, eax
add esp, 0x20
test esi, esi
je 0x4869f0
mov edx, dword [esp + 0x28]
push edx
push esi
call fcn.00486a10
push 3
push esi
push ebp
mov dword [esi + 0x10], edi
call fcn.004857b0
mov esi, eax
mov eax, dword [esp + 0x64]
push esi
push ebp
push eax
call fcn.00485920
mov eax, dword [ebp + 0x20]
mov ecx, dword [esp + 0x58]
lea edx, [esi + esi*4]
mov esi, dword [esp + 0x78]
add esp, 0x20
add ecx, eax
mov dword [eax + edx*8 + 4], esi
mov eax, ecx
pop edi
pop esi
mov byte [ecx + 0x13], 1
pop ebp
mov dword [esp + 0x10], ecx
mov word [eax + 0x10], 0x800
pop ebx
add esp, 0x3c
ret
push edi
push ebx
call fcn.004636d0
mov eax, dword [esp + 0x24]
add esp, 8
mov word [eax + 0x10], 0x800
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret