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

Disassembly:
push 0xffffffffffffffff
push 0x4c0a1a
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4fe870]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov edx, dword [ecx + 0x3c]
sub edx, dword [ecx + 0x38]
lea eax, [ecx + 0x2c]
mov dword [esp + 0x18], eax
test edx, 0xfffffffc
jne 0x418c84
push 0x4d819c
push 0x4d81b4
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.004188d0
xor ebx, ebx
mov dword [esp + 0x88], ebx
mov edi, dword [esp + 0x20]
cmp edi, ebx
jne 0x418a53
push 0x80004003
call fcn.004b9470
lea ecx, [esp + 0x1c]
push ecx
call fcn.00409960
mov byte [esp + 0x88], 1
mov eax, dword [eax]
cmp eax, ebx
je 0x418a6f
mov ebp, dword [eax]
jmp 0x418a71
xor ebp, ebp
mov byte [esp + 0x88], 0
lea edi, [esp + 0x1c]
call fcn.00409910
lea edx, [esp + 0x30]
push edx
call fcn.00465e80
mov byte [esp + 0x88], 2
xor eax, eax
mov word [esp + 0x68], ax
mov edi, 7
push 1
mov eax, str.CBuyShopWindow
lea esi, [esp + 0x68]
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], ebx
call fcn.00406fa0
mov byte [esp + 0x88], 3
xor ecx, ecx
mov eax, ebp
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x418ad7
sub eax, edx
sar eax, 1
push eax
mov eax, ebp
lea esi, [esp + 0x4c]
call fcn.00406fa0
mov byte [esp + 0x88], 4
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, esi
push ecx
call fcn.00453b40
add esp, 0xc
mov byte [esp + 0x88], 3
mov esi, 8
cmp dword [esp + 0x60], esi
jb 0x418b2f
mov edx, dword [esp + 0x4c]
push edx
call fcn.0047b19e
add esp, 4
xor eax, eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], ax
mov byte [esp + 0x88], 2
cmp dword [esp + 0x7c], esi
jb 0x418b59
mov ecx, dword [esp + 0x68]
push ecx
call fcn.0047b19e
add esp, 4
mov esi, dword [esp + 0x40]
xor edx, edx
mov dword [esp + 0x7c], edi
mov edi, dword [esp + 0x3c]
mov ecx, esi
sub ecx, edi
mov word [esp + 0x68], dx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ebp, edx
shr ebp, 0x1f
add ebp, edx
mov dword [esp + 0x78], ebx
test ebp, ebp
jle 0x418c53
xor ecx, ecx
mov dword [esp + 0x1c], ecx
jmp 0x418bac
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
sub esi, edi
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x418bd2
call fcn.0049f799
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + edi + 0x18], 8
jb 0x418bdf
mov edi, dword [ecx + edi + 4]
jmp 0x418be3
lea edi, [ecx + edi + 4]
push edi
call fcn.004a03c9
mov esi, dword [esp + 0x1c]
mov edx, dword [esi + 0xc]
add esp, 4
mov dword [esp + 0x24], eax
test edx, edx
jne 0x418bff
xor ecx, ecx
jmp 0x418c07
mov ecx, dword [esi + 0x14]
sub ecx, edx
sar ecx, 2
mov esi, dword [esi + 0x10]
mov edi, esi
sub edi, edx
sar edi, 2
cmp edi, ecx
jae 0x418c23
mov ecx, dword [esp + 0x18]
mov dword [esi], eax
add esi, 4
mov dword [ecx + 0x10], esi
jmp 0x418c45
cmp edx, esi
jbe 0x418c2c
call fcn.0049f799
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
push esi
push eax
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x34]
push eax
mov eax, ecx
call fcn.004105a0
add dword [esp + 0x1c], 0x1c
inc ebx
cmp ebx, ebp
jl 0x418ba0
mov byte [esp + 0x88], 0
lea ecx, [esp + 0x30]
push ecx
call fcn.004063f0
mov dword [esp + 0x88], 0xffffffff
mov eax, dword [esp + 0x20]
test eax, eax
je 0x418c80
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret