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

Disassembly:
sub esp, 0x8c
mov eax, dword [0x518450]
xor eax, esp
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x9c]
mov ecx, dword [esp + 0x98]
push ebx
push ebp
mov dword [esp + 0x1c], eax
xor ebp, ebp
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x28], edx
xor edx, edx
mov dword [esp + 0x20], eax
mov dword [esp + 8], ecx
mov dword [esp + 0x14], edx
push esi
push edi
test eax, eax
je 0x495e50
cmp byte [eax], dl
je 0x495e50
xor esi, esi
jmp 0x495e53
xor esi, esi
inc esi
test eax, eax
je 0x495e6f
push 9
push str.:memory:
push eax
call fcn.004bd26c
mov ecx, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x495e79
test esi, esi
je 0x495e7e
cmp byte [ecx + 0x1d], 2
jne 0x495e7e
xor edx, edx
inc edx
jmp 0x495e80
xor edx, edx
test dword [ecx + 0xc], 0x20000
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x18], edx
je 0x495e97
or eax, 2
mov dword [esp + 0x20], eax
test edx, edx
je 0x495ea6
or eax, 4
mov dword [esp + 0x20], eax
mov ebx, dword [esp + 0xb4]
test ebx, 0x100
je 0x495ed0
test edx, edx
jne 0x495ebd
test esi, esi
je 0x495ed0
and ebx, 0xfffffeff
or ebx, 0x200
mov dword [esp + 0xb4], ebx
push 0x2c
call fcn.0049f849
mov edi, eax
pop ecx
test edi, edi
jne 0x495ee6
push 7
pop eax
jmp 0x49627f
mov eax, dword [esp + 0x10]
mov byte [edi + 8], 0
mov dword [edi], eax
mov dword [edi + 0x1c], edi
mov dword [edi + 0x20], 1
cmp dword [esp + 0x18], ebp
jne 0x496021
test esi, esi
jne 0x496021
test ebx, 0x20000
je 0x496021
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 8]
inc esi
push esi
call fcn.0049f6bd
mov ebx, eax
mov byte [edi + 9], 1
pop ecx
test ebx, ebx
jne 0x495f38
push 7
jmp 0x496055
mov eax, dword [esp + 0x24]
push ebx
push esi
push dword [esp + 0x30]
mov byte [ebx], 0
push eax
call dword [eax + 0x24]
add esp, 0x10
cmp dword [0x51785c], ebp
jne 0x495f58
xor eax, eax
jmp 0x495f61
push 4
call dword [0x51789c]
pop ecx
push eax
mov dword [esp + 0x20], eax
call fcn.00479f0b
pop ecx
cmp dword [0x51785c], ebp
jne 0x495f78
xor eax, eax
jmp 0x495f81
push 2
call dword [0x51789c]
pop ecx
push eax
mov dword [esp + 0x30], eax
call fcn.00479f0b
mov esi, dword [0x5296f0]
pop ecx
jmp 0x495fd4
mov eax, dword [esi]
mov ecx, dword [eax + 0x90]
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x495fbe
test dl, dl
je 0x495fba
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x495fbe
add eax, 2
add ecx, 2
test dl, dl
jne 0x495f9e
xor eax, eax
jmp 0x495fc3
sbb eax, eax
or eax, 1
test eax, eax
jne 0x495fd1
mov eax, dword [esi]
mov ecx, dword [esp + 0x24]
cmp dword [eax], ecx
je 0x495fda
mov esi, dword [esi + 0x48]
test esi, esi
jne 0x495f94
jmp 0x496008
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
dec edx
js 0x496002
mov eax, dword [eax + 8]
mov ecx, edx
shl ecx, 4
add eax, 4
add ecx, eax
mov eax, dword [ecx]
test eax, eax
je 0x495ffc
cmp dword [eax + 4], esi
je 0x496037
sub ecx, 0x10
dec edx
jns 0x495ff1
mov dword [edi + 4], esi
inc dword [esi + 0x44]
push dword [esp + 0x2c]
call fcn.00479f29
push ebx
call fcn.0047bac8
pop ecx
pop ecx
test esi, esi
jne 0x4961e0
push 0x5c
call fcn.0049f849
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x496064
push 7
pop ebp
jmp 0x496259
push dword [esp + 0x2c]
call fcn.00479f29
mov edx, dword [esp + 0x20]
push edx
call fcn.00479f29
push ebx
call fcn.0047bac8
add esp, 0xc
push 0x13
pop esi
push edi
call fcn.0047bac8
pop ecx
mov eax, esi
jmp 0x49627f
push 0x48cf40
push dword [esp + 0xb8]
push dword [esp + 0x28]
push 0x4c
push dword [esp + 0x38]
push ebx
push dword [esp + 0x3c]
call fcn.004a0917
mov ebp, eax
add esp, 0x1c
test ebp, ebp
jne 0x49624c
mov esi, dword [ebx]
push 0x64
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.004bf040
mov eax, dword [esi + 0x3c]
xor edx, edx
add esp, 0xc
cmp dword [eax], edx
je 0x4960cd
push edx
push edx
push 0x64
lea ecx, [esp + 0x40]
push ecx
push eax
call fcn.004a0109
mov ebp, eax
add esp, 0x14
xor eax, eax
cmp ebp, 0x20a
cmove ebp, eax
xor edx, edx
test ebp, ebp
jne 0x49624c
mov eax, dword [esp + 0x20]
lea esi, [ebx + 0x24]
mov byte [ebx + 0x14], al
mov eax, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov eax, dword [ebx]
mov dword [eax + 0x98], fcn.004813ff
mov dword [eax + 0x9c], ebx
mov dword [edi + 4], ebx
mov ebp, dword [ebx]
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], edx
mov al, byte [ebp + 0xd]
mov byte [ebx + 0x10], al
movzx ecx, byte [esp + 0x45]
movzx eax, byte [esp + 0x44]
shl ecx, 8
or ecx, eax
shl ecx, 8
mov dword [esi], ecx
cmp ecx, 0x200
jb 0x49616c
cmp ecx, 0x10000
ja 0x49616c
lea eax, [ecx - 1]
test ecx, eax
jne 0x49616c
mov al, byte [esp + 0x48]
mov byte [esp + 0x17], al
lea eax, [esp + 0x68]
push eax
mov byte [ebx + 0x11], 1
call fcn.0049d05b
test eax, eax
setne al
mov byte [ebx + 0x15], al
lea eax, [esp + 0x78]
push eax
call fcn.0049d05b
test eax, eax
pop ecx
setne al
mov byte [ebx + 0x16], al
mov al, byte [esp + 0x1b]
pop ecx
jmp 0x496184
cmp dword [esp + 0x28], 0
mov dword [esi], edx
je 0x496182
cmp dword [esp + 0x18], 0
jne 0x496182
mov word [ebx + 0x15], 0
mov al, dl
movzx eax, al
push eax
push esi
push ebp
mov dword [esp + 0x24], eax
call fcn.004a104d
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x49624c
mov eax, dword [esi]
sub eax, dword [esp + 0x18]
mov dword [ebx + 0x28], eax
cmp byte [edi + 9], 0
je 0x4962e0
mov dword [ebx + 0x44], 1
cmp dword [0x51785c], ebp
jne 0x49621d
xor esi, esi
push esi
call fcn.00479f0b
mov eax, dword [0x5296f0]
push esi
mov dword [ebx + 0x48], eax
mov dword [0x5296f0], ebx
call fcn.00479f29
pop ecx
pop ecx
cmp byte [edi + 9], 0
je 0x4962e0
mov ebx, dword [esp + 0x10]
xor edx, edx
cmp dword [ebx + 4], edx
jle 0x4962e0
mov eax, dword [ebx + 8]
add eax, 4
mov ecx, dword [eax]
test ecx, ecx
je 0x49620f
cmp byte [ecx + 9], 0
jne 0x496298
inc edx
add eax, 0x10
cmp edx, dword [ebx + 4]
jl 0x4961ff
jmp 0x4962e0
push 2
call dword [0x51789c]
cmp dword [0x51785c], 0
mov esi, eax
pop ecx
je 0x4961c4
push 0
call dword [0x51789c]
mov dword [ebx + 0x3c], eax
pop ecx
test eax, eax
jne 0x4961c4
mov eax, dword [esp + 0x10]
push 7
pop ebp
mov byte [eax + 0x1e], 0
cmp dword [ebx], 0
je 0x496259
push dword [ebx]
call fcn.004a0446
pop ecx
push ebx
call fcn.0047bac8
push edi
call fcn.0047bac8
mov eax, dword [esp + 0x38]
and dword [eax], 0
pop ecx
pop ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x49627d
push eax
call fcn.00479f29
pop ecx
mov eax, ebp
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b9a6c
add esp, 0x8c
ret
xor edx, edx
jmp 0x49629e
mov ecx, dword [eax]
lea eax, [ecx + 0x18]
cmp dword [eax], edx
jne 0x49629c
mov eax, dword [edi + 4]
cmp eax, dword [ecx + 4]
jae 0x4962b8
mov dword [edi + 0x14], ecx
mov dword [edi + 0x18], edx
mov dword [ecx + 0x18], edi
jmp 0x4962e0
cmp dword [ecx + 0x14], edx
je 0x4962cd
mov edx, dword [ecx + 0x14]
cmp dword [edx + 4], eax
jae 0x4962cd
mov ecx, edx
cmp dword [ecx + 0x14], 0
jne 0x4962bd
mov eax, dword [ecx + 0x14]
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], ecx
test eax, eax
je 0x4962dd
mov dword [eax + 0x18], edi
mov dword [ecx + 0x14], edi
mov eax, dword [esp + 0x30]
push 0
push 0
push edi
mov dword [eax], edi
call fcn.0049655f
add esp, 0xc
test eax, eax
jne 0x49626e
mov eax, dword [edi + 4]
push 0x7d0
push dword [eax]
call fcn.004a0f6b
jmp 0x49626c