Function at 0x511470
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x2280
call fcn.00475aaf
mov eax, dword [0x5dd040]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x1c], 0
jne 0x511499
mov eax, 1
jmp 0x511978
mov dword [ebp - 0x221c], 0
lea eax, [ebp - 0x221c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 6
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
jne 0x5114c4
mov dword [ebp - 0x221c], 0
push 0x20a
push 0
lea edx, [ebp - 0x210]
push edx
call fcn.004769dc
add esp, 0xc
mov dword [ebp - 0x2264], 0x105
lea eax, [ebp - 0x2264]
push eax
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 0x221c]
push edx
call fcn.00476db0
add esp, 0xc
test eax, eax
jne 0x51155b
push 0
call fcn.005128a0
add esp, 4
mov dword [ebp - 0x2268], eax
mov dword [ebp - 0x226c], 0x105
push 0
push 0x160
push 0x5c30b0
push str.common_message_window
push str.traits::tcscpy_s_program_name___sizeof___countof_helper_program_name____0___get_program_name_unknown_text_Character____
lea eax, [ebp - 0x2268]
push eax
lea ecx, [ebp - 0x226c]
push ecx
lea edx, [ebp - 0x210]
push edx
call fcn.00477c33
add esp, 0xc
push eax
call fcn.00475f87
add esp, 0x18
lea eax, [ebp - 0x210]
push eax
call fcn.004788c7
add esp, 4
mov dword [ebp - 0x2224], eax
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x2214], ecx
cmp dword [ebp - 0x2224], 0x40
jbe 0x5115df
mov edx, dword [ebp - 0x2224]
mov eax, dword [ebp - 0x2214]
lea ecx, [eax + edx*2 - 0x80]
mov dword [ebp - 0x2214], ecx
mov edx, 2
imul eax, edx, 0
mov ecx, 0x2e
mov edx, dword [ebp - 0x2214]
mov word [edx + eax], cx
mov eax, 2
shl eax, 0
mov ecx, 0x2e
mov edx, dword [ebp - 0x2214]
mov word [edx + eax], cx
mov eax, 2
shl eax, 1
mov ecx, 0x2e
mov edx, dword [ebp - 0x2214]
mov word [edx + eax], cx
cmp dword [ebp + 0x18], 0
je 0x5115f9
lea eax, [ebp + 0x18]
push eax
call fcn.004764d2
add esp, 4
mov dword [ebp - 0x2228], eax
jmp 0x511603
mov dword [ebp - 0x2228], 0
mov ecx, dword [ebp - 0x2228]
mov dword [ebp - 0x222c], ecx
mov dword [ebp - 0x2218], 0
cmp dword [ebp + 0x18], 0
je 0x51163b
cmp dword [ebp - 0x222c], 0x40
jbe 0x51163b
mov edx, dword [ebp - 0x222c]
mov eax, dword [ebp + 0x18]
lea ecx, [eax + edx*2 - 0x7a]
mov dword [ebp - 0x2218], ecx
cmp dword [ebp + 8], 2
jne 0x51164f
mov edx, dword [0x5c2cec]
mov dword [ebp - 0x2234], edx
jmp 0x511659
mov dword [ebp - 0x2234], 0x56df60
mov eax, 2
imul ecx, eax, 0
mov edx, dword [ebp + 0x1c]
movzx eax, word [edx + ecx]
test eax, eax
je 0x511677
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x2238], ecx
jmp 0x511681
mov dword [ebp - 0x2238], 0x5c35c0
mov edx, 2
imul eax, edx, 0
mov ecx, dword [ebp + 0x1c]
movzx edx, word [ecx + eax]
test edx, edx
je 0x5116a6
cmp dword [ebp + 8], 2
jne 0x5116a6
mov dword [ebp - 0x223c], 0x5c33ac
jmp 0x5116b0
mov dword [ebp - 0x223c], 0x56df60
mov eax, 2
imul ecx, eax, 0
mov edx, dword [ebp + 0x1c]
movzx eax, word [edx + ecx]
test eax, eax
je 0x5116cf
mov dword [ebp - 0x2240], 0x5c33cc
jmp 0x5116d9
mov dword [ebp - 0x2240], 0x56df60
cmp dword [ebp + 0x14], 0
je 0x5116ea
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x2244], ecx
jmp 0x5116f4
mov dword [ebp - 0x2244], 0x5c35c0
cmp dword [ebp + 0x14], 0
je 0x511706
mov dword [ebp - 0x2248], str._nLine:
jmp 0x511710
mov dword [ebp - 0x2248], 0x56df60
cmp dword [ebp + 0x10], 0
je 0x511721
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x224c], edx
jmp 0x51172b
mov dword [ebp - 0x224c], 0x5c35c0
cmp dword [ebp + 0x10], 0
je 0x51173d
mov dword [ebp - 0x2250], str._nFile:
jmp 0x511747
mov dword [ebp - 0x2250], 0x56df60
cmp dword [ebp - 0x2218], 0
je 0x51175e
mov eax, dword [ebp - 0x2218]
mov dword [ebp - 0x2254], eax
jmp 0x511785
cmp dword [ebp + 0x18], 0
je 0x51176f
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x2230], ecx
jmp 0x511779
mov dword [ebp - 0x2230], 0x5c35c0
mov edx, dword [ebp - 0x2230]
mov dword [ebp - 0x2254], edx
cmp dword [ebp - 0x2218], 0
je 0x51179a
mov dword [ebp - 0x2258], 0x5c33fc
jmp 0x5117a4
mov dword [ebp - 0x2258], 0x56df60
cmp dword [ebp + 0x18], 0
je 0x5117b6
mov dword [ebp - 0x225c], str._nModule:
jmp 0x5117c0
mov dword [ebp - 0x225c], 0x56df60
mov eax, dword [ebp + 8]
mov ecx, dword [eax*4 + 0x5c2c90]
mov dword [ebp - 0x2270], ecx
push 0
call fcn.00512880
add esp, 4
mov dword [ebp - 0x2274], eax
mov edx, dword [ebp - 0x2234]
push edx
mov eax, dword [ebp - 0x2238]
push eax
mov ecx, dword [ebp - 0x223c]
push ecx
mov edx, dword [ebp - 0x2240]
push edx
mov eax, dword [ebp - 0x2244]
push eax
mov ecx, dword [ebp - 0x2248]
push ecx
mov edx, dword [ebp - 0x224c]
push edx
mov eax, dword [ebp - 0x2250]
push eax
mov ecx, dword [ebp - 0x2254]
push ecx
mov edx, dword [ebp - 0x2258]
push edx
mov eax, dword [ebp - 0x225c]
push eax
mov ecx, dword [ebp - 0x2214]
push ecx
mov edx, dword [ebp - 0x2270]
push edx
mov eax, dword [ebp - 0x2274]
push eax
push 0xfff
push 0x1000
lea ecx, [ebp - 0x2210]
push ecx
call fcn.00476e91
add esp, 0x44
mov dword [ebp - 0x2260], eax
call fcn.00477094
mov edx, dword [eax]
mov dword [ebp - 0x2278], edx
call fcn.00477094
mov dword [eax], 0
cmp dword [ebp - 0x2260], 0
jge 0x5118ac
push 0
push 0x192
push 0x5c30b0
push str.common_message_window
push str.__errno___
push 0x22
push 0x16
call fcn.00477094
mov eax, dword [eax]
push eax
call fcn.0047629d
add esp, 0x20
call fcn.00477094
mov ecx, dword [ebp - 0x2278]
mov dword [eax], ecx
cmp dword [ebp - 0x2260], 0
jge 0x5118fa
push 0
push 0x196
push 0x5c30b0
push str.common_message_window
push str.wcscpy_s_message_buffer__4096__L__CrtDbgReport:_String_too_long_or_IO_Error__
push 0x5c3500
push 0x1000
lea edx, [ebp - 0x2210]
push edx
call fcn.0047700d
add esp, 0xc
push eax
call fcn.00475f87
add esp, 0x18
push 0x12012
push 0x5c3568
lea eax, [ebp - 0x2210]
push eax
call fcn.00475802
add esp, 0xc
mov dword [ebp - 0x227c], eax
mov ecx, dword [ebp - 0x227c]
mov dword [ebp - 0x2220], ecx
cmp dword [ebp - 0x2220], 3
je 0x511942
cmp dword [ebp - 0x2220], 4
je 0x51196f
cmp dword [ebp - 0x2220], 5
je 0x511976
jmp 0x511976
call fcn.00478719
mov dword [ebp - 0x2280], eax
cmp dword [ebp - 0x2280], 0
je 0x511960
push 0x16
call fcn.004789c6
add esp, 4
push 3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, 1
jmp 0x511978
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00476928
mov esp, ebp
pop ebp
ret