Function at 0x512290
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x190
mov esi, esp
mov dword [esi + 0x178], ebp
lea edi, [esi + 0x180]
mov dword [edi - 4], esp
xor eax, eax
dec eax
mov dword [edi + 8], eax
mov dword [edi + 4], 0x457d50
mov eax, dword fs:[0]
mov dword [edi], eax
mov dword fs:[0], edi
mov eax, 0xc8
lea ebx, [esi + 0xb0]
push eax
push 0xff
push ebx
call fcn.004d5a00
add esp, 0xc
mov dword [esi + 8], ebx
mov dword [esi + 0xc], fcn.004ff490
xor ecx, ecx
dec ecx
mov dword [esi + 0x30], ecx
lea eax, [esi + 4]
mov dword [eax], ecx
mov dword [esi + 0x3c], ebx
mov dword [edi + 8], 1
mov ecx, dword [ebp + 0x18]
push eax
call fcn.004b8140
mov edi, dword [esi + 4]
mov dword [esi + 0x40], 0x5c5df0
mov dword [esi + 0x44], 0x40ad00
mov eax, dword [0x5c5df0]
cmp eax, 0xffffffff
jne 0x5125b0
mov eax, dword [0x5c5df4]
lea edx, [eax - 1]
mov ecx, dword [edi + 8]
mov edi, dword [edi + 0xc]
sub edi, ecx
sar edi, 2
cmp edi, edx
jbe 0x5125a1
mov ebx, dword [ecx + eax*4 - 4]
mov dword [esi + 0x188], 2
test ebx, ebx
je 0x5125a1
mov dl, byte [ebp + 0x14]
lea eax, [esi + 0xb0]
mov ecx, 0xc8
add eax, ecx
lea ecx, [esi + 0x34]
mov byte [ecx], 0
lea edi, [esi + 8]
movzx edx, dl
push eax
lea eax, [esi + 0x30]
push eax
push edi
mov dword [esi], ebx
push ebx
push ecx
push dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
push dword [ecx + 4]
lea eax, [esi + 4]
push eax
push edx
push dword [ebp + 0x10]
lea eax, [ebp + 0xc]
push eax
call fcn.005126a0
add esp, 0x2c
test al, al
je 0x5124f7
pcmpeqd xmm0, xmm0
lea edx, [esi + 0x10]
movdqa xmmword [edx], xmm0
mov dword [edx + 0x10], 0xffffffff
mov ecx, dword [esi]
mov eax, dword [ecx]
push edx
push 0x57b41b
push str.0123456789
call dword [eax + 0x28]
pcmpeqd xmm0, xmm0
movdqa xmmword [esi + 0x90], xmm0
movdqa xmmword [esi + 0x80], xmm0
movdqa xmmword [esi + 0x70], xmm0
movdqa xmmword [esi + 0x60], xmm0
movdqa xmmword [esi + 0x50], xmm0
movdqa xmmword [esi + 0x40], xmm0
mov dword [esi + 0xa0], 0xffffffff
mov edi, dword [esi + 0x30]
mov ebx, dword [esi + 8]
mov eax, edi
sub eax, ebx
cmp eax, 0xc5
jl 0x51243a
shr eax, 1
add eax, 2
push eax
call fcn.004b8610
add esp, 4
mov ecx, eax
test eax, eax
jne 0x51243f
mov dword [esi + 0x38], 0
mov dword [esi + 0x188], 3
call fcn.00503840
lea ecx, [esi + 0x40]
xor eax, eax
cmp byte [esi + 0x34], 0
je 0x512449
mov byte [ecx], 0x2d
inc ecx
cmp ebx, edi
mov dword [esi], eax
jae 0x5124bc
lea edx, [esi + 0x10]
mov eax, ecx
movzx ecx, word [ebx]
mov edi, edx
cmp word [esi + 0x10], cx
je 0x5124a2
lea edi, [esi + 0x12]
cmp word [esi + 0x12], cx
je 0x5124a2
lea edi, [esi + 0x14]
cmp word [esi + 0x14], cx
je 0x5124a2
lea edi, [esi + 0x16]
cmp word [esi + 0x16], cx
je 0x5124a2
lea edi, [esi + 0x18]
cmp word [esi + 0x18], cx
je 0x5124a2
lea edi, [esi + 0x1a]
cmp word [esi + 0x1a], cx
je 0x5124a2
lea edi, [esi + 0x1c]
cmp word [esi + 0x1c], cx
je 0x5124a2
lea edi, [esi + 0x1e]
cmp word [esi + 0x1e], cx
jne 0x512563
lea edx, [esi + 0x10]
sub edi, edx
sar edi, 1
mov cl, byte [edi + str.0123456789]
mov byte [eax], cl
add ebx, 2
inc eax
cmp ebx, dword [esi + 0x30]
jb 0x512454
jmp 0x5124be
mov eax, ecx
mov byte [eax], 0
lea eax, [esi + 0x40]
push dword [ebp + 0x20]
push 0x57b3fd
push eax
call fcn.0042a510
add esp, 0xc
cmp eax, 1
jne 0x512585
mov eax, dword [esi]
test eax, eax
je 0x5124ed
push eax
call fcn.004b85f0
add esp, 4
mov dword [esi + 0x188], 2
lea eax, [ebp + 0x10]
lea ecx, [ebp + 0xc]
push eax
call fcn.00503c60
mov edi, dword [ebp + 8]
test al, al
je 0x512510
mov eax, dword [ebp + 0x1c]
or byte [eax], 2
mov eax, dword [ebp + 0xc]
mov dword [edi], eax
mov ecx, dword [esi + 4]
xor eax, eax
dec eax
lock xadd dword [ecx + 4], eax
test eax, eax
jne 0x512529
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi + 8]
mov dword [esi + 8], 0
test eax, eax
je 0x51254b
mov dword [esi + 0x188], 0
push eax
call dword [esi + 0xc]
mov edi, dword [ebp + 8]
add esp, 4
mov eax, dword [esi + 0x180]
mov dword fs:[0], eax
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
lea edi, [esi + 0x20]
cmp word [esi + 0x20], cx
je 0x5124a2
lea edi, [esi + 0x22]
cmp word [esi + 0x22], cx
je 0x5124a2
lea edi, [esi + 0x24]
jmp 0x5124a2
mov eax, dword [esi]
mov dword [esi + 0x38], eax
mov dword [esi + 0x188], 3
push str.money_get_error
call fcn.00504320
add esp, 4
mov dword [esi + 0x188], 2
call fcn.00504fd0
mov dword [esi], edi
lea eax, [esi + 0x40]
lea ecx, [esi + 0x10]
mov dword [ecx], eax
lea eax, [esi + 0x34]
mov dword [eax], ecx
mov dword [esi + 0x188], 2
push 0x40acf0
push eax
push 0x5c5df0
call fcn.004176f0
add esp, 0xc
mov edi, dword [esi]
jmp 0x51232d