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

Disassembly:
sub esp, 0x8c
mov eax, dword [0x517490]
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 0x495875
cmp byte [eax], dl
je 0x495875
xor esi, esi
jmp 0x495878
xor esi, esi
inc esi
test eax, eax
je 0x495894
push 9
push str.:memory:
push eax
call fcn.004bccbc
mov ecx, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x49589e
test esi, esi
je 0x4958a3
cmp byte [ecx + 0x1d], 2
jne 0x4958a3
xor edx, edx
inc edx
jmp 0x4958a5
xor edx, edx
test dword [ecx + 0xc], 0x20000
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x18], edx
je 0x4958bc
or eax, 2
mov dword [esp + 0x20], eax
test edx, edx
je 0x4958cb
or eax, 4
mov dword [esp + 0x20], eax
mov ebx, dword [esp + 0xb4]
test ebx, 0x100
je 0x4958f5
test edx, edx
jne 0x4958e2
test esi, esi
je 0x4958f5
and ebx, 0xfffffeff
or ebx, 0x200
mov dword [esp + 0xb4], ebx
push 0x2c
call fcn.0049f26f
mov edi, eax
pop ecx
test edi, edi
jne 0x49590b
push 7
pop eax
jmp 0x495ca4
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 0x495a46
test esi, esi
jne 0x495a46
test ebx, 0x20000
je 0x495a46
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 8]
inc esi
push esi
call fcn.0049f0e3
mov ebx, eax
mov byte [edi + 9], 1
pop ecx
test ebx, ebx
jne 0x49595d
push 7
jmp 0x495a7a
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 [0x51689c], ebp
jne 0x49597d
xor eax, eax
jmp 0x495986
push 4
call dword [0x5168dc]
pop ecx
push eax
mov dword [esp + 0x20], eax
call fcn.00479933
pop ecx
cmp dword [0x51689c], ebp
jne 0x49599d
xor eax, eax
jmp 0x4959a6
push 2
call dword [0x5168dc]
pop ecx
push eax
mov dword [esp + 0x30], eax
call fcn.00479933
mov esi, dword [0x528730]
pop ecx
jmp 0x4959f9
mov eax, dword [esi]
mov ecx, dword [eax + 0x90]
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4959e3
test dl, dl
je 0x4959df
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4959e3
add eax, 2
add ecx, 2
test dl, dl
jne 0x4959c3
xor eax, eax
jmp 0x4959e8
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4959f6
mov eax, dword [esi]
mov ecx, dword [esp + 0x24]
cmp dword [eax], ecx
je 0x4959ff
mov esi, dword [esi + 0x48]
test esi, esi
jne 0x4959b9
jmp 0x495a2d
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
dec edx
js 0x495a27
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 0x495a21
cmp dword [eax + 4], esi
je 0x495a5c
sub ecx, 0x10
dec edx
jns 0x495a16
mov dword [edi + 4], esi
inc dword [esi + 0x44]
push dword [esp + 0x2c]
call fcn.00479951
push ebx
call fcn.0047b4f0
pop ecx
pop ecx
test esi, esi
jne 0x495c05
push 0x5c
call fcn.0049f26f
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x495a89
push 7
pop ebp
jmp 0x495c7e
push dword [esp + 0x2c]
call fcn.00479951
mov edx, dword [esp + 0x20]
push edx
call fcn.00479951
push ebx
call fcn.0047b4f0
add esp, 0xc
push 0x13
pop esi
push edi
call fcn.0047b4f0
pop ecx
mov eax, esi
jmp 0x495ca4
push 0x48c965
push dword [esp + 0xb8]
push dword [esp + 0x28]
push 0x4c
push dword [esp + 0x38]
push ebx
push dword [esp + 0x3c]
call fcn.004a033d
mov ebp, eax
add esp, 0x1c
test ebp, ebp
jne 0x495c71
mov esi, dword [ebx]
push 0x64
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.004bea90
mov eax, dword [esi + 0x3c]
xor edx, edx
add esp, 0xc
cmp dword [eax], edx
je 0x495af2
push edx
push edx
push 0x64
lea ecx, [esp + 0x40]
push ecx
push eax
call fcn.0049fb2f
mov ebp, eax
add esp, 0x14
xor eax, eax
cmp ebp, 0x20a
cmove ebp, eax
xor edx, edx
test ebp, ebp
jne 0x495c71
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.00480e24
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 0x495b91
cmp ecx, 0x10000
ja 0x495b91
lea eax, [ecx - 1]
test ecx, eax
jne 0x495b91
mov al, byte [esp + 0x48]
mov byte [esp + 0x17], al
lea eax, [esp + 0x68]
push eax
mov byte [ebx + 0x11], 1
call fcn.0049ca80
test eax, eax
setne al
mov byte [ebx + 0x15], al
lea eax, [esp + 0x78]
push eax
call fcn.0049ca80
test eax, eax
pop ecx
setne al
mov byte [ebx + 0x16], al
mov al, byte [esp + 0x1b]
pop ecx
jmp 0x495ba9
cmp dword [esp + 0x28], 0
mov dword [esi], edx
je 0x495ba7
cmp dword [esp + 0x18], 0
jne 0x495ba7
mov word [ebx + 0x15], 0
mov al, dl
movzx eax, al
push eax
push esi
push ebp
mov dword [esp + 0x24], eax
call fcn.004a0a73
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x495c71
mov eax, dword [esi]
sub eax, dword [esp + 0x18]
mov dword [ebx + 0x28], eax
cmp byte [edi + 9], 0
je 0x495d05
mov dword [ebx + 0x44], 1
cmp dword [0x51689c], ebp
jne 0x495c42
xor esi, esi
push esi
call fcn.00479933
mov eax, dword [0x528730]
push esi
mov dword [ebx + 0x48], eax
mov dword [0x528730], ebx
call fcn.00479951
pop ecx
pop ecx
cmp byte [edi + 9], 0
je 0x495d05
mov ebx, dword [esp + 0x10]
xor edx, edx
cmp dword [ebx + 4], edx
jle 0x495d05
mov eax, dword [ebx + 8]
add eax, 4
mov ecx, dword [eax]
test ecx, ecx
je 0x495c34
cmp byte [ecx + 9], 0
jne 0x495cbd
inc edx
add eax, 0x10
cmp edx, dword [ebx + 4]
jl 0x495c24
jmp 0x495d05
push 2
call dword [0x5168dc]
cmp dword [0x51689c], 0
mov esi, eax
pop ecx
je 0x495be9
push 0
call dword [0x5168dc]
mov dword [ebx + 0x3c], eax
pop ecx
test eax, eax
jne 0x495be9
mov eax, dword [esp + 0x10]
push 7
pop ebp
mov byte [eax + 0x1e], 0
cmp dword [ebx], 0
je 0x495c7e
push dword [ebx]
call fcn.0049fe6c
pop ecx
push ebx
call fcn.0047b4f0
push edi
call fcn.0047b4f0
mov eax, dword [esp + 0x38]
and dword [eax], 0
pop ecx
pop ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x495ca2
push eax
call fcn.00479951
pop ecx
mov eax, ebp
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b94b6
add esp, 0x8c
ret
xor edx, edx
jmp 0x495cc3
mov ecx, dword [eax]
lea eax, [ecx + 0x18]
cmp dword [eax], edx
jne 0x495cc1
mov eax, dword [edi + 4]
cmp eax, dword [ecx + 4]
jae 0x495cdd
mov dword [edi + 0x14], ecx
mov dword [edi + 0x18], edx
mov dword [ecx + 0x18], edi
jmp 0x495d05
cmp dword [ecx + 0x14], edx
je 0x495cf2
mov edx, dword [ecx + 0x14]
cmp dword [edx + 4], eax
jae 0x495cf2
mov ecx, edx
cmp dword [ecx + 0x14], 0
jne 0x495ce2
mov eax, dword [ecx + 0x14]
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], ecx
test eax, eax
je 0x495d02
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.00495f84
add esp, 0xc
test eax, eax
jne 0x495c93
mov eax, dword [edi + 4]
push 0x7d0
push dword [eax]
call fcn.004a0991
jmp 0x495c91