Function at 0x5158a0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5e6df8
push eax
mov eax, dword [ebp + 8]
mov dword fs:[0], esp
sub esp, 0x20
push ebx
mov ebx, dword [eax]
push esi
mov esi, dword [eax + 4]
push edi
mov edi, dword [ebx]
cmp edi, reloc.WS2_32.dll_closesocket
jne 0x51591b
mov eax, dword [0x6f7e0c]
sub eax, 0
je 0x51591b
dec eax
je 0x5158f3
dec eax
jne 0x51591b
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x515b0a
mov eax, dword [esi + 0xb8]
cmp byte [eax], 0xcc
jne 0x51591b
inc eax
pop edi
mov dword [esi + 0xb8], eax
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push 1
lea ecx, [ebp - 0x2c]
call fcn.00515560
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
mov byte [ebp - 0xe], 0
call fcn.005155c0
push edi
lea eax, [ebp - 0x2c]
push str.ExceptionCode:__08X_n
push eax
call fcn.00514e60
add esp, 0xc
test dword [esi], 0x10001
je 0x515979
mov ecx, dword [esi + 0xc4]
mov edx, dword [esi + 0xb8]
mov eax, dword [esi + 0xb4]
push ecx
push edx
push eax
lea ecx, [ebp - 0x2c]
push str.ContextRegCtl:_ebp_p_eip_p_esp_p_n
push ecx
call fcn.00514e60
add esp, 0x14
test dword [esi], 0x10002
je 0x5159bc
mov edx, dword [esi + 0x9c]
mov eax, dword [esi + 0xa0]
mov ecx, dword [esi + 0xa4]
push edx
mov edx, dword [esi + 0xa8]
push eax
mov eax, dword [esi + 0xac]
push ecx
mov ecx, dword [esi + 0xb0]
push edx
push eax
push ecx
lea edx, [ebp - 0x2c]
push str.ContextRegInt:_eax_p_ecx_p_edx_p_ebx_p_esi_p_edi_p_n
push edx
call fcn.00514e60
add esp, 0x20
mov eax, dword [ebx + 0xc]
push eax
lea ecx, [ebp - 0x2c]
push str.ExceptionAddr:__p_n
push ecx
call fcn.00514e60
add esp, 0xc
cmp edi, 0xc0000005
je 0x5159e1
cmp edi, 0xc0000006
jne 0x515a49
mov edx, dword [ebp + 8]
mov eax, dword [edx]
cmp dword [eax + 0x10], 2
jb 0x515a49
mov eax, dword [ebx + 0x14]
sub eax, 0
mov ecx, dword [ebx + 0x18]
push ecx
je 0x515a1d
dec eax
je 0x515a12
sub eax, 7
je 0x515a07
push str.FaultAddr:______p_n
jmp 0x515a22
push str.ExecAddr:_______p_n
lea edx, [ebp - 0x2c]
push edx
jmp 0x515a26
push str.WriteAddr:______p_n
lea eax, [ebp - 0x2c]
push eax
jmp 0x515a26
push str.ReadAddr:_______p_n
lea ecx, [ebp - 0x2c]
push ecx
call fcn.00514e60
add esp, 0xc
cmp dword [ebx + 0x10], 3
jb 0x515a49
mov edx, dword [ebx + 0x1c]
push edx
lea eax, [ebp - 0x2c]
push str.NTSTATUS:_______d_n
push eax
call fcn.00514e60
add esp, 0xc
mov eax, dword [0x6f7e08]
test eax, eax
je 0x515a79
push eax
lea ecx, [ebp - 0x2c]
push str.CallbackAddr:___p_n
push ecx
call fcn.00514e60
mov edx, dword [0x6f7e04]
push edx
lea eax, [ebp - 0x2c]
push str.CallbackArg:____p_n
push eax
call fcn.00514e60
add esp, 0x18
mov eax, dword [0x6f7e10]
test eax, eax
je 0x515a94
push eax
lea ecx, [ebp - 0x2c]
push str.cur_msg_type:___08X_n
push ecx
call fcn.00514e60
add esp, 0xc
mov ax, word [0x6f7e00]
test ax, ax
je 0x515ab4
movzx edx, ax
push edx
lea eax, [ebp - 0x2c]
push str.cur_game_code:__u_n
push eax
call fcn.00514e60
add esp, 0xc
movzx ecx, byte [0x6a200a]
push ecx
lea edx, [ebp - 0x2c]
push str.AlertEnable:____u_n
push edx
call fcn.00514e60
mov eax, dword [0x6f7de4]
add esp, 0xc
push eax
lea ecx, [ebp - 0x2c]
call fcn.005156b0
lea ecx, [ebp - 0x2c]
call fcn.00514e80
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.005155a0
cmp byte [0x6f7dfc], 0
je 0x515b05
push 0
call fcn.004608c0
add esp, 4
call fcn.00515140
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4