Function at 0x407d40
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x460c2b
mov eax, dword fs:[0]
push eax
sub esp, 0x4b0
mov eax, dword [0x479408]
xor eax, esp
mov dword [esp + 0x4a8], eax
push ebx
push esi
push edi
mov eax, dword [0x479408]
xor eax, esp
push eax
lea eax, [esp + 0x4c0]
mov dword fs:[0], eax
mov ebx, ecx
call fcn.0041ce2d
mov eax, dword [ebx + 0x74]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push eax
mov eax, dword [ebx + 0x20]
push 1
push 0x80
push eax
call esi
mov eax, dword [ebx + 0x74]
mov ecx, dword [ebx + 0x20]
push eax
push 0
push 0x80
push ecx
call esi
push 1
push 0x1eb
push 0x1dc
push 0
push 0
mov ecx, ebx
call fcn.0041d56d
push 0
mov ecx, ebx
call fcn.00418b18
call fcn.00412af1
mov eax, dword [eax + 0xc]
push 0x83
push eax
call dword [sym.imp.USER32.dll_LoadBitmapA]
push eax
lea ecx, [ebx + 0x8e4]
call fcn.0041c7ad
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x84]
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x90]
sub eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x8c]
sub ecx, dword [esp + 0x84]
push 5
push 5
add eax, 1
push eax
add ecx, 1
push ecx
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateRoundRectRgn]
mov ecx, dword [ebx + 0x20]
push 1
mov esi, eax
push esi
push ecx
call dword [sym.imp.USER32.dll_SetWindowRgn]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebx + 0x20]
mov edi, dword [sym.imp.USER32.dll_GetClientRect]
lea edx, [esp + 0x40]
push edx
push eax
call edi
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
add edx, 8
mov dword [esp + 0x44], edx
add edx, 0x10
add eax, 6
mov dword [esp + 0x4c], edx
sub edx, dword [esp + 0x44]
lea ecx, [eax + 0xc8]
push 1
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], ecx
lea esi, [ebx + 0x6ec]
push edx
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x50]
push ecx
push eax
mov ecx, esi
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x10]
push edx
push eax
call edi
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0x16]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x14]
add ecx, 6
lea edx, [ecx + 0x10]
push 1
mov dword [esp + 0x20], edx
sub edx, ecx
push edx
mov edx, dword [esp + 0x18]
sub eax, 6
mov dword [esp + 0x20], eax
sub eax, edx
push eax
push ecx
mov dword [esp + 0x24], ecx
lea esi, [ebx + 0x514]
push edx
mov ecx, esi
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
push 1
sub edx, eax
push edx
mov edx, dword [esp + 0x20]
sub edx, ecx
push edx
push eax
lea esi, [ebx + 0x600]
push ecx
mov ecx, esi
call fcn.0041d56d
push 0
mov ecx, esi
call fcn.0041d5ab
push 0
push 0xffffffffffffffeb
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push 1
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x18]
sub edx, ecx
push edx
push eax
lea esi, [ebx + 0x78]
push ecx
mov ecx, esi
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
push 0
push 0xffffffffffffffeb
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push 1
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x18]
sub edx, ecx
push edx
push eax
lea esi, [ebx + 0x164]
push ecx
mov ecx, esi
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
mov eax, dword [ebx + 0x20]
lea esi, [ebx + 0xb00]
push esi
push eax
call edi
add dword [ebx + 0xb04], 0x1e
mov eax, dword [ebx + 0xb04]
add dword [esi], 4
add dword [ebx + 0xb08], 0xfffffffc
add eax, 0x3c
mov dword [ebx + 0xb0c], eax
mov eax, dword [esi + 4]
mov edx, dword [esi + 0xc]
mov ecx, dword [esi]
push 1
sub edx, eax
push edx
mov edx, dword [esi + 8]
sub edx, ecx
push edx
push eax
push ecx
lea ecx, [ebx + 0x794]
call fcn.0041d56d
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi]
push 1
sub ecx, eax
push ecx
mov ecx, dword [esi + 8]
sub ecx, edx
push ecx
push eax
push edx
lea ecx, [ebx + 0x83c]
call fcn.0041d56d
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x60]
push edx
push eax
call edi
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
add edx, 0x97
mov dword [esp + 0x64], edx
add eax, 0xe
add edx, 0x1c
push 1
lea ecx, [eax + 0x78]
mov dword [esp + 0x70], edx
sub edx, dword [esp + 0x68]
mov dword [esp + 0x6c], ecx
push edx
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x70]
push ecx
lea esi, [ebx + 0x250]
mov dword [esp + 0x70], eax
push eax
mov ecx, esi
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x70]
push edx
push eax
call edi
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
add edx, 0x8b
mov dword [esp + 0x74], edx
add eax, 0x94
add edx, 0x34
push 1
lea ecx, [eax + 0xb4]
mov dword [esp + 0x80], edx
sub edx, dword [esp + 0x78]
mov dword [esp + 0x7c], ecx
push edx
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x80]
push ecx
lea esi, [ebx + 0x33c]
push eax
mov ecx, esi
mov dword [esp + 0x84], eax
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x50]
push edx
push eax
call edi
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x50]
add edx, 0x97
mov dword [esp + 0x54], edx
add eax, 0x156
add edx, 0x1c
push 1
lea ecx, [eax + 0x78]
mov dword [esp + 0x60], edx
sub edx, dword [esp + 0x58]
mov dword [esp + 0x5c], ecx
push edx
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x60]
push ecx
lea esi, [ebx + 0x428]
push eax
mov ecx, esi
mov dword [esp + 0x64], eax
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x20]
push edx
push eax
call edi
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
add dword [esp + 0x20], 0xe
add ecx, 0x69
lea edx, [ecx + 0x18]
sub eax, 0xe
mov dword [esp + 0x2c], edx
sub edx, ecx
push 1
push edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ecx
lea esi, [ebx + 0x740]
sub eax, edx
push eax
push ecx
push edx
mov ecx, esi
call fcn.0041d56d
push 5
mov ecx, esi
call fcn.0041d5ab
mov ecx, dword [ebx + 0x20]
lea esi, [ebx + 0xb10]
push esi
push ecx
call edi
add dword [ebx + 0xb14], 0xce
mov eax, dword [ebx + 0xb14]
add dword [esi], 4
add dword [ebx + 0xb18], 0xfffffffc
add eax, 0xfa
mov dword [ebx + 0xb1c], eax
mov eax, dword [esi + 4]
mov edi, dword [esi + 0xc]
mov edx, dword [esi]
push 1
sub edi, eax
push edi
mov edi, dword [esi + 8]
sub edi, edx
push edi
push eax
lea ecx, [ebx + 0x7e8]
push edx
call fcn.0041d56d
mov eax, dword [esi + 4]
mov edi, dword [esi + 0xc]
mov edx, dword [esi]
mov esi, dword [esi + 8]
push 1
sub edi, eax
push edi
sub esi, edx
push esi
push eax
lea ecx, [ebx + 0x890]
push edx
call fcn.0041d56d
mov dword [ebx + 0xd4], 0x88
mov dword [ebx + 0xd0], 0x87
mov dword [ebx + 0x1c0], 0x8a
mov dword [ebx + 0x1bc], 0x89
mov dword [ebx + 0x2ac], 0x8c
mov dword [ebx + 0x2a8], 0x8b
mov dword [ebx + 0x398], 0x8e
mov dword [ebx + 0x394], 0x8d
mov dword [ebx + 0x484], 0x90
mov dword [ebx + 0x480], 0x8f
mov dword [ebx + 0x570], 0xab
mov dword [ebx + 0x56c], 0xaa
mov dword [ebx + 0x65c], 0xad
mov dword [ebx + 0x658], 0xac
call fcn.00412af1
mov eax, dword [eax + 4]
push str.Main_gamex.ini
add eax, 0xa4
push eax
lea edx, [esp + 0x88]
push edx
call fcn.004022f0
add esp, 0xc
lea esi, [ebx + 0x8ec]
push eax
mov ecx, esi
mov dword [esp + 0x4cc], 0
call fcn.00405c30
mov dword [esp + 0x4c8], 0xffffffff
mov eax, dword [esp + 0x80]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4082e3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [0x46e078]
mov edx, dword [0x46e07c]
mov al, byte [0x46e080]
push 0xfb
mov dword [esp + 0x98], ecx
lea ecx, [esp + 0xa1]
push 0
push ecx
mov dword [esp + 0xa4], edx
mov byte [esp + 0xa8], al
call fcn.0042d310
mov edx, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 0xc
push edx
push 0x100
lea eax, [esp + 0x2ac]
push eax
push str.Error
push str.Name
push str.AppName
call edi
mov ecx, dword [esi]
push ecx
push 0x100
lea edx, [esp + 0x3b4]
push edx
push str.Error
push str.Name
push str.Main
call edi
lea eax, [esp + 0x2a4]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408372
sub eax, edx
push eax
lea ecx, [ebx + 0x8f0]
lea eax, [esp + 0x2a8]
call fcn.004073c0
lea eax, [esp + 0x3ac]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4083a0
sub eax, edx
push eax
lea ecx, [ebx + 0x9f4]
lea eax, [esp + 0x3b0]
call fcn.004073c0
lea eax, [ebx + 0x8f0]
lea edx, [esp + 0x19c]
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [eax + edx], cl
add eax, 1
test cl, cl
jne 0x4083d0
lea eax, [esp + 0x94]
mov esi, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4083e5
lea edi, [esp + 0x19c]
sub eax, esi
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x408400
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x19c]
rep movsb byte es:[edi], byte [esi]
push eax
mov ecx, ebx
call fcn.0041d511
lea ecx, [esp + 0x19c]
push ecx
lea ecx, [ebx + 0x6ec]
call fcn.0041d511
lea eax, [ebx + 0x8f0]
push eax
lea ecx, [ebx + 0x740]
call fcn.0041d511
push 5
lea ecx, [ebx + 0x794]
call fcn.0041d5ab
push 5
lea ecx, [ebx + 0x7e8]
call fcn.0041d5ab
push 1
push 0
push 0
push 0
push 0
lea ecx, [ebx + 0x83c]
call fcn.0041d56d
push 1
push 0
push 0
push 0
push 0
lea ecx, [ebx + 0x890]
call fcn.0041d56d
mov eax, dword [ebx + 0x20]
lea edx, [esp + 0x30]
push edx
push eax
mov byte [ebx + 0xaf8], 0
call dword [sym.imp.USER32.dll_GetClientRect]
lea ecx, [esp + 0x30]
push ecx
mov ecx, ebx
call fcn.0041c268
mov eax, dword [esp + 0x38]
mov edx, dword [ebx + 0xb24]
mov dword [esp + 0x30], eax
add eax, 0x130
lea esi, [ebx + 0xb24]
push ebx
mov dword [esp + 0x3c], eax
mov eax, dword [edx + 0x134]
push 0xa5
mov ecx, esi
call eax
test esi, esi
je 0x40855a
cmp dword [esi + 0x20], 0
je 0x40855a
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
push 1
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x38]
sub edx, ecx
push edx
push eax
push ecx
mov ecx, esi
call fcn.0041d56d
push 1
push 1
push 1
push 0
push 0
lea ecx, [esi + 0x7c]
call fcn.0041d56d
push 1
push 1
push 1
push 0
push 0
lea ecx, [esi + 0xd0]
call fcn.0041d56d
mov edi, dword [ebx + 0xc9c]
cmp dword [edi + 0x28], 1
jbe 0x408551
cmp byte [edi + 0x31], 0
je 0x40854d
mov eax, dword [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov byte [edi + 0x31], 0
push 1
mov ecx, esi
call fcn.0041d5ab
push 0
push 0
push 0
push 0
push ebx
push 0x407840
call fcn.00416b65
push 0
push 0
push 0
lea eax, [ebx + 0xcc0]
push 0
push eax
push 0x407800
mov byte [eax], 1
mov dword [ebx + 0xcc4], ebx
call fcn.00416b65
push 0
push 0
push 0
push 0
push ebx
push 0x407640
call fcn.00416b65
push 0
push 0
push 0
push 0
push ebx
push 0x407490
call fcn.00416b65
mov eax, 1
mov ecx, dword [esp + 0x4c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.00428a74
mov esp, ebp
pop ebp
ret