Function at 0x415930
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x42cdd6
mov eax, dword fs:[0]
push eax
sub esp, 0x130
push ebx
push ebp
push esi
push edi
mov eax, dword [0x438020]
xor eax, esp
push eax
lea eax, [esp + 0x144]
mov dword fs:[0], eax
mov esi, ecx
mov ebp, dword [esp + 0x154]
mov eax, dword [0x439134]
mov edx, dword [eax + 0xc]
mov ecx, 0x439134
call edx
xor ebx, ebx
add eax, 0x10
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x14c], ebx
mov eax, dword [ebp + 0x114]
cmp eax, ebx
mov dword [esp + 0x20], ebx
je 0x4159b8
push eax
mov eax, dword [esp + 0x15c]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x15c]
mov ecx, dword [edx + 0x18]
cmp ecx, ebx
je 0x4159d9
mov eax, dword [ecx]
mov edx, dword [eax + 0x30]
call edx
cmp eax, ebx
je 0x4159d9
mov eax, dword [eax + 0x20]
add eax, 8
jmp 0x4159db
xor eax, eax
push 0xfde9
lea ecx, [esp + 0x44]
push eax
lea eax, [esp + 0x44]
mov dword [esp + 0x44], ecx
call fcn.00409f40
mov byte [esp + 0x14c], 1
mov edx, dword [esp + 0x3c]
cmp edx, ebx
je 0x415a18
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x415a07
sub eax, edi
sar eax, 1
mov ebx, eax
push edx
lea eax, [esp + 0x28]
call fcn.0040a270
mov byte [esp + 0x14c], 0
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x40]
cmp eax, edx
je 0x415a40
push eax
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
mov ecx, dword [esp + 0x24]
xor edi, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov eax, dword [ecx - 0xc]
cmp eax, 0xffffffff
mov ebx, ecx
jne 0x415a5f
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esp + 0x18]
push ecx
push eax
push ebx
mov ebx, dword [esp + 0x164]
mov edx, dword [ebx]
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [ebp + 0x114], edi
je 0x415a8c
mov eax, dword [esp + 0x20]
mov ecx, dword [ebx]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [ebp + 0x4c]
call fcn.0040d480
mov edx, dword [ebp + 0x1c]
sub edx, dword [eax + 0x28]
mov eax, dword [esi]
add eax, dword [esp + 0x18]
cmp eax, edx
jle 0x415ac2
mov ecx, dword [ebp + 0x4c]
call fcn.0040d480
mov ecx, dword [eax + 0x28]
add ecx, dword [ebp + 0x14]
mov dword [esi], ecx
mov ecx, dword [ebp + 0x4c]
call fcn.0040d480
mov edx, dword [eax + 0x34]
add dword [esi + 4], edx
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
lea edx, [eax + ecx]
mov ecx, dword [esi]
push edx
add edi, ecx
push edi
push eax
push ecx
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [ebp + 0x4c]
call fcn.0040d480
mov eax, dword [eax + 0x30]
add eax, dword [esp + 0x34]
mov edi, dword [esp + 0x15c]
mov dword [esi], eax
add edi, 0x2c
mov esi, 0x42eb40
call int.00425400
test eax, eax
je 0x415b24
mov eax, dword [eax + 0x18]
add eax, 8
je 0x415b24
push eax
call dword [sym.imp.MSVCR80.dll_atoi]
add esp, 4
mov dword [esp + 0x28], eax
jmp 0x415b2c
mov dword [esp + 0x28], 0
mov ecx, dword [ebp + 0x15c]
lea esi, [ebp + 0x158]
push ecx
lea ebx, [esp + 0x28]
mov ecx, esi
call fcn.00421810
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x415b4f
mov dword [ecx], eax
jmp 0x415b51
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x14c], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x415b7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x144]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x13c
ret 0xc