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

Disassembly:
push 0xffffffffffffffff
push 0x4f0b86
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x164
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x40], ebp
call fcn.004be1a0
xor ebx, ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x17c], ebx
call fcn.004be1a0
mov al, byte [esp + 0x17]
sub esp, 0x10
mov edx, esp
or esi, 0xffffffff
mov edi, 0x520010
mov ecx, esi
mov byte [edx], al
xor eax, eax
mov dword [edx + 4], ebx
mov dword [edx + 8], ebx
mov dword [edx + 0xc], ebx
mov dword [esp + 0x34], esp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x18c], 1
push ecx
push 0x520010
mov ecx, edx
call fcn.004142c0
push ebx
lea ecx, [esp + 0x3c]
call fcn.004ca360
push 0xb
mov ecx, ebp
mov byte [esp + 0x180], 2
call fcn.00484f40
cmp ax, bx
jge 0x48943c
push ebx
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x4c], esp
push 6
push 0x50f76c
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 3
mov ecx, esp
mov dword [esp + 0x34], esp
push 6
push 0x50f970
jmp 0x48946e
jne 0x4894d2
push ebx
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x4c], esp
push 6
push 0x50f634
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 4
mov ecx, esp
mov dword [esp + 0x34], esp
push 6
push 0x50f998
call fcn.004be240
mov ecx, 0x5200a8
mov byte [esp + 0x18c], 2
call fcn.004caf10
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x4894aa
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4894a1
cmp al, 0xff
je 0x4894a1
dec al
mov byte [ecx], al
jmp 0x4894aa
push ecx
call fcn.004de1a0
add esp, 4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x17c], bl
call fcn.004be2e0
mov dword [esp + 0x17c], esi
jmp 0x489afb
push 0xffff
lea ecx, [esp + 0x78]
push 0x50f930
push ecx
call fcn.004de8d6
mov al, byte [esp + 0x23]
push ecx
mov edx, esp
lea edi, [esp + 0x84]
or ecx, 0xffffffff
mov dword [esp + 0x34], esp
mov byte [edx], al
xor eax, eax
mov dword [edx + 4], ebx
mov dword [edx + 8], ebx
mov dword [edx + 0xc], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x88]
push ecx
mov ecx, edx
call fcn.004142c0
sub esp, 0x10
lea edx, [esp + 0x37]
mov ecx, esp
mov dword [esp + 0x74], esp
push edx
push 0x50f8e4
mov byte [esp + 0x1a4], 5
call fcn.00413bf0
sub esp, 0x10
lea eax, [esp + 0x6f]
mov ecx, esp
mov dword [esp + 0xa0], esp
push eax
push 0x50f9a8
mov byte [esp + 0x1b4], 6
call fcn.00413bf0
sub esp, 0x10
lea edx, [esp + 0x7e]
mov ecx, esp
mov dword [esp + 0x98], esp
push edx
push 0x520010
mov byte [esp + 0x1c4], 7
call fcn.00413bf0
sub esp, 0x10
mov byte [esp + 0x1cc], 8
mov esi, esp
mov dword [esp + 0x70], esp
push ecx
mov ecx, esp
mov dword [esp + 0x64], esp
push 6
push 0x50fa6c
call fcn.004be240
push esi
call fcn.004cfca0
sub esp, 8
mov byte [esp + 0x1dc], 9
mov esi, esp
mov dword [esp + 0x70], esp
push ecx
mov ecx, esp
mov dword [esp + 0x74], esp
push 6
push 0x50fa6c
call fcn.004be240
push esi
call fcn.004cfca0
add esp, 8
lea eax, [esp + 0xbc]
mov byte [esp + 0x1dc], 2
push eax
mov ecx, 0x5200a8
call fcn.004cb120
mov edx, dword [0x4f73d0]
mov cx, word [eax]
push edx
add eax, 4
mov word [esp + 0x2c], cx
push ebx
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x188], 0xa
call fcn.00413e90
mov eax, dword [esp + 0x64]
mov byte [esp + 0x17c], 2
cmp eax, ebx
je 0x489646
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x48963d
cmp al, 0xff
je 0x48963d
dec al
mov byte [ecx], al
jmp 0x489646
push ecx
call fcn.004de1a0
add esp, 4
lea ecx, [esp + 0x28]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
call fcn.004c48d0
cmp ax, 2
je 0x48998c
lea eax, [esp + 0x44]
lea ecx, [esp + 0x28]
push eax
call fcn.004ca4a0
mov edi, dword [eax + 4]
cmp edi, ebx
jne 0x48967f
mov edi, 0x4f7480
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x74]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x48]
and ecx, 3
cmp eax, ebx
rep movsb byte es:[edi], byte [esi]
je 0x4896c5
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4896bc
cmp al, 0xff
je 0x4896bc
dec al
mov byte [ecx], al
jmp 0x4896c5
push ecx
call fcn.004de1a0
add esp, 4
lea ecx, [esp + 0x74]
mov dword [esp + 0x48], ebx
push ecx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
call fcn.004dea48
add esp, 4
cmp ax, bx
mov dword [esp + 0x24], eax
jl 0x4896f2
movsx edx, ax
cmp edx, 0xffff
jle 0x48973a
push ebx
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 6
push 0x50f76c
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 0xb
mov ecx, esp
mov dword [esp + 0x30], esp
push 6
push 0x5100f8
call fcn.004be240
mov ecx, 0x5200a8
mov byte [esp + 0x18c], 2
call fcn.004caf10
jmp 0x4894d2
push ebx
push ebx
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 6
push 0x50f634
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 0xc
mov ecx, esp
mov dword [esp + 0x30], esp
push 6
push 0x50fa54
call fcn.004be240
mov ecx, 0x5200a8
mov byte [esp + 0x18c], 2
call fcn.004caf10
mov al, byte [ebp + 0x2f]
lea esi, [ebp + 0x40]
mov byte [0x5125c6], al
mov eax, dword [esp + 0x24]
mov ecx, eax
mov byte [0x5125d7], al
sar ecx, 8
mov byte [0x5125d6], cl
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x4897c9
mov al, byte [eax - 1]
cmp al, bl
je 0x4897b9
cmp al, 0xff
je 0x4897b9
mov edx, dword [esi + 8]
push ebx
push edx
mov ecx, esi
call fcn.004144a0
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x4897c4
mov byte [eax - 1], 0xff
mov eax, dword [esi + 4]
jmp 0x4897ce
mov eax, 0x4f7480
mov al, byte [eax]
mov byte [0x5125d0], al
mov ecx, dword [esi + 8]
cmp ecx, 1
jb 0x489809
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x489809
mov al, byte [eax - 1]
cmp al, bl
je 0x4897f8
cmp al, 0xff
je 0x4897f8
push ebx
push ecx
mov ecx, esi
call fcn.004144a0
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x489803
mov byte [eax - 1], 0xff
mov eax, dword [esi + 4]
inc eax
jmp 0x48980e
mov eax, 0x4f7480
mov cl, byte [eax]
mov byte [0x5125d1], cl
mov ecx, dword [esi + 8]
cmp ecx, 2
jb 0x48984c
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x48984c
mov al, byte [eax - 1]
cmp al, bl
je 0x489839
cmp al, 0xff
je 0x489839
push ebx
push ecx
mov ecx, esi
call fcn.004144a0
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x489844
mov byte [eax - 1], 0xff
mov eax, dword [esi + 4]
add eax, 2
jmp 0x489851
mov eax, 0x4f7480
mov dl, byte [eax]
mov byte [0x5125d2], dl
mov ecx, dword [esi + 8]
cmp ecx, 3
jb 0x48988f
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x48988f
mov al, byte [eax - 1]
cmp al, bl
je 0x48987c
cmp al, 0xff
je 0x48987c
push ebx
push ecx
mov ecx, esi
call fcn.004144a0
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x489887
mov byte [eax - 1], 0xff
mov esi, dword [esi + 4]
add esi, 3
jmp 0x489894
mov esi, 0x4f7480
movsx cx, byte [0x5125c4]
mov al, byte [esi]
push ecx
push 0x5125c5
lea ecx, [esp + 0x20]
mov byte [0x5125d3], al
call fcn.004be740
lea edx, [esp + 0x1c]
lea eax, [esp + 0x18]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.004be1b0
mov ecx, ebp
call fcn.00480fe0
cmp ax, bx
jg 0x489902
push ebx
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 6
push 0x50f76c
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 0xd
mov ecx, esp
mov dword [esp + 0x30], esp
push 6
push 0x50f970
jmp 0x489975
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x20]
cmp ax, bx
jg 0x48993d
push ebx
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 6
push 0x50f76c
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 0xe
mov ecx, esp
mov dword [esp + 0x30], esp
push 6
push 0x50f970
jmp 0x489975
movsx eax, word [esp + 0x24]
mov ecx, dword [ebp + 0x50]
push ebx
push 1
push ecx
cmp eax, ecx
mov ecx, esp
je 0x4899b7
mov dword [esp + 0x1c], esp
push 6
push 0x50f76c
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 0xf
mov ecx, esp
mov dword [esp + 0x30], esp
push 6
push 0x50fa44
call fcn.004be240
mov ecx, 0x5200a8
mov byte [esp + 0x18c], 2
call fcn.004caf10
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x489ad4
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x489acb
cmp al, 0xff
je 0x489acb
dec al
mov byte [ecx], al
jmp 0x489ad4
mov dword [esp + 0x1c], esp
push 6
push 0x50f634
call fcn.004be240
push ecx
mov byte [esp + 0x18c], 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push 6
push 0x50fa4c
call fcn.004be240
mov ecx, 0x5200a8
mov byte [esp + 0x18c], 2
call fcn.004caf10
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x20], esp
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push 6
push 0x51266c
call fcn.004be240
push esi
call fcn.004cfca0
mov ecx, dword [0x5200c0]
add esp, 8
call fcn.004cced0
mov ecx, dword [esp + 0x40]
xor ebp, ebp
lea esi, [ecx + 4]
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x489a38
xor edx, edx
jmp 0x489a4e
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx edi, bp
cmp edi, edx
jae 0x489abb
push edi
mov ecx, esi
call fcn.00413cf0
mov dl, byte [eax + 4]
add eax, 4
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x20], esp
mov byte [ecx], dl
mov dword [ecx + 4], ebx
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], ebx
mov edx, dword [0x4f73d0]
push edx
push ebx
push eax
call fcn.00413e90
push edi
mov ecx, esi
mov byte [esp + 0x190], 0x11
call fcn.00413cf0
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
call fcn.004be1b0
mov ecx, dword [0x5200c0]
mov byte [esp + 0x190], 2
call fcn.004cd1d0
inc ebp
jmp 0x489a2d
mov ecx, dword [0x5200c0]
call fcn.004cd2e0
jmp 0x48998c
push ecx
call fcn.004de1a0
add esp, 4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x17c], bl
call fcn.004be2e0
mov dword [esp + 0x17c], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.004be2e0
mov ecx, dword [esp + 0x174]
pop edi
pop esi
pop ebp
mov ax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x170
ret