Function at 0x405160
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48912a
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x4b0070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x128], edi
mov ecx, dword [edi + 0x2ec]
lea edx, [ebp - 0x120]
push edx
mov eax, dword [ecx]
call dword [eax + 0x28]
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.0041d5b0
mov esi, eax
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x4057f8
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x124], eax
push esi
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.00401f70
test al, al
jne 0x405212
test esi, esi
jne 0x4051f1
xor ecx, ecx
jmp 0x405205
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4051f6
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x124]
call fcn.00402220
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 3
call fcn.00409b60
mov esi, dword [ebp - 0x124]
lea eax, [ebp - 0x94]
push 3
push esi
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x98], eax
call fcn.0040bef0
mov byte [ebp - 4], 4
lea ecx, [edi + 0x388]
push dword [ebp - 0x98]
call fcn.0040b0f0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x94]
mov eax, dword [ebp - 0x98]
cmp eax, ecx
je 0x405273
push eax
call fcn.00472e3f
add esp, 4
push ecx
lea eax, [esi - 0x10]
mov edi, esp
mov dword [ebp - 0x12c], edi
mov ecx, eax
mov dword [ebp - 0x12c], eax
call fcn.00403340
add eax, 0x10
mov dword [edi], eax
call fcn.00405e70
push ecx
mov edi, esp
mov dword [ebp - 0x130], esp
mov dword [ebp - 0x134], edi
call fcn.00401cf0
test eax, eax
je 0x4057f8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
push 0x499b14
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.00401f70
test al, al
jne 0x4052e0
push 0
push 0x499b14
mov ecx, edi
call fcn.00402220
push ecx
mov byte [ebp - 4], 6
mov edi, esp
mov dword [ebp - 0x134], esp
mov dword [ebp - 0x138], edi
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x405802
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
push str.Begin_install_game_hall
mov ecx, edi
mov byte [ebp - 4], 7
call fcn.00401f70
test al, al
jne 0x40532e
push 0x17
push str.Begin_install_game_hall
mov ecx, edi
call fcn.00402220
push ecx
mov byte [ebp - 4], 8
mov edi, esp
mov dword [ebp - 0x138], edi
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x40580c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
push str.game_hall_install
mov ecx, edi
mov byte [ebp - 4], 9
call fcn.00401f70
test al, al
jne 0x405376
push 0x11
push str.game_hall_install
mov ecx, edi
call fcn.00402220
mov byte [ebp - 4], 8
mov edi, dword [ebp - 0x128]
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.00407960
push ecx
mov ebx, esp
mov dword [ebp - 0x138], esp
mov dword [ebp - 0x134], ebx
call fcn.00401cf0
test eax, eax
je 0x4057f8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebx], eax
push 0x499b14
mov ecx, ebx
mov byte [ebp - 4], 0xa
call fcn.00401f70
test al, al
jne 0x4053d5
push 0
push 0x499b14
mov ecx, ebx
call fcn.00402220
push ecx
mov byte [ebp - 4], 0xb
mov ebx, esp
mov dword [ebp - 0x134], esp
mov dword [ebp - 0x130], ebx
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x405816
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
push str.Begin_install_game_hall_device
mov ecx, ebx
mov byte [ebp - 4], 0xc
call fcn.00401f70
test al, al
jne 0x405423
push 0x1e
push str.Begin_install_game_hall_device
mov ecx, ebx
call fcn.00402220
push ecx
mov byte [ebp - 4], 0xd
mov ebx, esp
mov dword [ebp - 0x130], ebx
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x405820
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
push str.game_hall_install
mov ecx, ebx
mov byte [ebp - 4], 0xe
call fcn.00401f70
test al, al
jne 0x40546b
push 0x11
push str.game_hall_install
mov ecx, ebx
call fcn.00402220
mov byte [ebp - 4], 0xd
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.00407960
call fcn.0040fa80
test esi, esi
je 0x40555f
mov ecx, esi
lea ebx, [eax + 0x328]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405492
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, ebx
call fcn.00402220
push ecx
lea eax, [ebp - 0x128]
mov ecx, ebx
push eax
call fcn.00412370
mov byte [ebp - 4], 0xf
mov ecx, 0x49a83c
mov esi, dword [ebp - 0x128]
mov eax, esi
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4054f6
test dx, dx
je 0x4054f2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4054f6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4054d0
xor eax, eax
jmp 0x4054fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x405543
mov ecx, 0x49b018
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40552c
test dx, dx
je 0x405528
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40552c
add eax, 4
add ecx, 4
test dx, dx
jne 0x405506
xor eax, eax
jmp 0x405531
sbb eax, eax
or eax, 1
test eax, eax
je 0x405543
push 1
push 0x49a83c
mov ecx, ebx
call fcn.0040c610
mov byte [ebp - 4], 3
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40555f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.0040fa80
mov ecx, dword [edi + 0x300]
xor ebx, ebx
mov dword [eax + 0x338], ecx
cmp dword [edi + 0x304], ebx
setne bl
call fcn.0040fa80
mov dword [eax + 0x33c], ebx
call fcn.0040fa80
mov ecx, dword [edi + 4]
mov dword [eax + 0x334], ecx
call fcn.0040fa80
mov edx, dword [0x497d20]
mov esi, dword [0x497d24]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
call fcn.0040fa80
mov edx, dword [0x497d28]
mov esi, dword [0x497d2c]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
call fcn.0040fa80
mov edx, dword [0x497d60]
mov esi, dword [0x497d64]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
cmp dword [edi + 0x300], 0
jne 0x4056df
cmp dword [edi + 0x304], 0
jne 0x4056df
call fcn.0040fa80
mov edx, dword [0x497d38]
mov esi, dword [0x497d3c]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
mov ecx, dword [edi + 0x2d8]
call fcn.004235e0
test al, al
je 0x405676
call fcn.0040fa80
mov edx, dword [0x497d40]
mov esi, dword [0x497d44]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
mov ecx, dword [edi + 0x2e0]
call fcn.004235e0
test al, al
je 0x4056aa
call fcn.0040fa80
mov edx, dword [0x497d48]
mov esi, dword [0x497d4c]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
mov ecx, dword [edi + 0x2dc]
call fcn.004235e0
test al, al
je 0x4056cc
call fcn.0040fa80
mov edx, dword [0x497d58]
mov esi, dword [0x497d5c]
jmp 0x40573a
call fcn.0040fa80
mov edx, dword [0x497d68]
mov esi, dword [0x497d6c]
jmp 0x40573a
call fcn.0040fa80
mov edx, dword [0x497d38]
mov esi, dword [0x497d3c]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
call fcn.0040fa80
mov edx, dword [0x497d40]
mov esi, dword [0x497d44]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
call fcn.0040fa80
mov edx, dword [0x497d50]
mov esi, dword [0x497d54]
mov ecx, dword [eax + 0x324]
mov dword [eax + ecx*8 + 4], edx
mov dword [eax + ecx*8 + 8], esi
inc dword [eax + 0x324]
call fcn.0040fa80
push 0
push 0
mov esi, eax
push esi
push 0x40fc10
push 0
push 0
call fcn.00473039
mov dword [esi + 0x32c], eax
add esp, 0x18
mov ecx, dword [edi + 0x2a4]
push 0
mov eax, dword [ecx]
call dword [eax + 0xcc]
mov ecx, dword [edi + 0x2a8]
push 1
mov eax, dword [ecx]
call dword [eax + 0xcc]
push 0xa
push 0x203230
push dword [edi + 0x2f0]
lea ecx, [edi + 0x2c]
mov dword [edi + 0x318], 0xdc
mov dword [edi + 0x31c], 0x1aa
call fcn.0041f620
mov edx, dword [ebp - 0x12c]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4057dc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046780a
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402200
push 0x80004005
call fcn.00402200
push 0x80004005
call fcn.00402200
push 0x80004005
call fcn.00402200
push 0x80004005
call fcn.00402200
int3