Function at 0x4184f0
Capabilities:
Packed with generic packer
Print debug messages
Write file on windows

Disassembly:
pushal
popal
push ebp
push esp
pop ebp
push 0xfffffffffffffffe
push 0x459d50
push 0x40e260
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x805c
call fcn.004193a0
mov eax, dword [0x45ba3c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x1024], 0
mov dword [ebp - 0x302c], 0
xor eax, eax
mov word [ebp - 0x5030], ax
push 0x1ffe
push 0
lea ecx, [ebp - 0x502e]
push ecx
call fcn.00408840
add esp, 0xc
sub edx, edx
mov word [ebp - 0x3028], dx
push 0x1ffe
push 0
lea eax, [ebp - 0x3026]
push eax
call fcn.00408840
add esp, 0xc
mov byte [ebp - 0x1020], 0
push 0xfff
push 0
lea ecx, [ebp - 0x101f]
push ecx
call fcn.00408840
add esp, 0xc
sub edx, edx
mov word [ebp - 0x7030], dx
push 0x1ffe
push 0
lea eax, [ebp - 0x702e]
push eax
call fcn.00408840
add esp, 0xc
cmp dword [ebp + 8], 0
jl 0x4185c9
cmp dword [ebp + 8], 3
jl 0x4185d1
or eax, 0xffffffff
jmp 0x418dff
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 2
jne 0x418698
push 0x45c024
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
test eax, eax
jle 0x418698
push 0
push 0x1ed
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str._itow_s_nLine__szLineMessage__4096__10_
push 0xa
push 0x1000
lea ecx, [ebp - 0x5030]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.00425cb0
add esp, 0x10
push eax
call fcn.00408050
add esp, 0x18
push str.Second_Chance_Assertion_Failed:_File
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp + 0xc], 0
je 0x41864a
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x806c], eax
jmp 0x418654
mov dword [ebp - 0x806c], str._file_unknown_
mov ecx, dword [ebp - 0x806c]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x453db0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea edx, [ebp - 0x5030]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x453dac
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call fcn.00417a40
mov dword [ebp - 0x1024], 0xffffffff
jmp 0x418dd9
cmp dword [ebp + 0x18], 0
je 0x418762
call fcn.0040fc50
mov eax, dword [eax]
mov dword [ebp - 0x7038], eax
call fcn.0040fc50
mov dword [eax], 0
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
push 0xfeb
push 0x1000
lea eax, [ebp - 0x7030]
push eax
call 0x425be0
add esp, 0x14
mov dword [ebp - 0x7034], eax
cmp dword [ebp - 0x7034], 0
jge 0x418714
push 0
push 0x203
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.__errno___
push 0x22
push 0x16
call fcn.0040fc50
mov ecx, dword [eax]
push ecx
call fcn.0040d740
add esp, 0x20
call fcn.0040fc50
mov edx, dword [ebp - 0x7038]
mov dword [eax], edx
cmp dword [ebp - 0x7034], 0
jge 0x418762
push 0
push 0x206
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcscpy_s_szUserMessage__4096__L__CrtDbgReport:_String_too_long_or_IO_Error__
push 0x451068
push 0x1000
lea eax, [ebp - 0x7030]
push eax
call fcn.00414d50
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
cmp dword [ebp + 8], 2
jne 0x4187be
cmp dword [ebp + 0x18], 0
je 0x41877a
mov dword [ebp - 0x8070], str.Assertion_failed:
jmp 0x418784
mov dword [ebp - 0x8070], str.Assertion_failed_
push 0
push 0x20b
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcscpy_s_szLineMessage__4096__szFormat___L_Assertion_failed:___:_L_Assertion_failed___
mov ecx, dword [ebp - 0x8070]
push ecx
push 0x1000
lea edx, [ebp - 0x5030]
push edx
call fcn.00414d50
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
push 0
push 0x20d
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcscat_s_szLineMessage__4096__szUserMessage_
lea eax, [ebp - 0x7030]
push eax
push 0x1000
lea ecx, [ebp - 0x5030]
push ecx
call fcn.00414520
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
cmp dword [ebp + 8], 2
jne 0x41887d
mov edx, dword [ebp + 8]
mov eax, dword [edx*4 + 0x45c028]
and eax, 1
je 0x418845
push 0
push 0x212
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push 0x453b60
push 0x453b5c
push 0x1000
lea ecx, [ebp - 0x5030]
push ecx
call fcn.00414520
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
push 0
push 0x214
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcscat_s_szLineMessage__4096__L__n__
push 0x453dac
push 0x1000
lea edx, [ebp - 0x5030]
push edx
call fcn.00414520
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
cmp dword [ebp + 0xc], 0
je 0x41895f
mov dword [ebp - 0x703c], 0
call fcn.0040fc50
mov eax, dword [eax]
mov dword [ebp - 0x7040], eax
call fcn.0040fc50
mov dword [eax], 0
lea ecx, [ebp - 0x5030]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str._s__d__:__s
push 0x1000
push 0x1000
lea ecx, [ebp - 0x3028]
push ecx
call fcn.00419080
add esp, 0x1c
mov dword [ebp - 0x703c], eax
cmp dword [ebp - 0x703c], 0
jge 0x41890f
push 0
push 0x21c
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.__errno___
push 0x22
push 0x16
call fcn.0040fc50
mov edx, dword [eax]
push edx
call fcn.0040d740
add esp, 0x20
call fcn.0040fc50
mov ecx, dword [ebp - 0x7040]
mov dword [eax], ecx
cmp dword [ebp - 0x703c], 0
jge 0x41895d
push 0
push 0x21e
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcscpy_s_szOutMessage__4096__L__CrtDbgReport:_String_too_long_or_IO_Error__
push 0x451068
push 0x1000
lea edx, [ebp - 0x3028]
push edx
call fcn.00414d50
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
jmp 0x418999
push 0
push 0x222
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcscpy_s_szOutMessage__4096__szLineMessage_
lea eax, [ebp - 0x5030]
push eax
push 0x1000
lea ecx, [ebp - 0x3028]
push ecx
call fcn.00414d50
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
mov dword [ebp - 0x7044], 0
push 0
push 0x228
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcstombs_s___void__0___szOutMessage2__4096__szOutMessage____size_t__1__
push 0x22
push 0x16
push 0xffffffffffffffff
lea edx, [ebp - 0x3028]
push edx
push 0x1000
lea eax, [ebp - 0x1020]
push eax
push 0
call 0x425260
add esp, 0x14
push eax
call fcn.0040d740
add esp, 0x20
mov dword [ebp - 0x7044], eax
cmp dword [ebp - 0x7044], 0
je 0x418a2c
push 0
push 0x22a
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.strcpy_s_szOutMessage2__4096____CrtDbgReport:_String_too_long_or_Invalid_characters_in_String__
push str._CrtDbgReport:_String_too_long_or_Invalid_characters_in_String
push 0x1000
lea ecx, [ebp - 0x1020]
push ecx
call fcn.00411830
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
cmp dword [0x45f134], 0
jne 0x418a42
cmp dword [0x45f130], 0
je 0x418b65
mov dword [ebp - 0x704c], 0
mov dword [ebp - 0x7048], 0
push 0xf
call fcn.0040e720
add esp, 4
mov dword [ebp - 4], 1
mov edx, dword [0x45f134]
mov dword [ebp - 0x704c], edx
jmp 0x418a84
mov eax, dword [ebp - 0x704c]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x704c], ecx
cmp dword [ebp - 0x704c], 0
je 0x418ad5
mov dword [ebp - 0x7050], 0
lea edx, [ebp - 0x7050]
push edx
lea eax, [ebp - 0x1020]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x704c]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
or eax, eax
je 0x418ad3
mov ecx, dword [ebp - 0x7050]
mov dword [ebp - 0x1024], ecx
mov dword [ebp - 0x302c], 1
jmp 0x418ad5
jmp 0x418a75
cmp dword [ebp - 0x302c], 0
jne 0x418b4c
mov edx, dword [0x45f130]
mov dword [ebp - 0x7048], edx
jmp 0x418afb
mov eax, dword [ebp - 0x7048]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x7048], ecx
cmp dword [ebp - 0x7048], 0
je 0x418b4c
mov dword [ebp - 0x7054], 0
lea edx, [ebp - 0x7054]
push edx
lea eax, [ebp - 0x3028]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x7048]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
test eax, eax
je 0x418b4a
mov ecx, dword [ebp - 0x7054]
mov dword [ebp - 0x1024], ecx
mov dword [ebp - 0x302c], 1
jmp 0x418b4c
jmp 0x418aec
mov dword [ebp - 4], 0
call fcn.00418b5a
jmp 0x418b65
cmp dword [ebp - 0x302c], 0
jne 0x418dd9
cmp dword [0x45f12c], 0
je 0x418bba
mov dword [ebp - 0x7058], 0
lea edx, [ebp - 0x7058]
push edx
lea eax, [ebp - 0x1020]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [0x45f12c]
add esp, 0xc
or eax, eax
je 0x418bba
mov edx, dword [ebp - 0x7058]
mov dword [ebp - 0x1024], edx
mov dword [ebp - 0x302c], 1
cmp dword [ebp - 0x302c], 0
jne 0x418dd9
mov eax, dword [ebp + 8]
mov ecx, dword [eax*4 + 0x45c028]
and ecx, 1
je 0x418d35
mov edx, dword [ebp + 8]
cmp dword [edx*4 + 0x45c034], 0xffffffff
je 0x418d35
mov eax, dword [ebp + 8]
mov ecx, dword [eax*4 + 0x45c034]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x8074], eax
cmp dword [ebp - 0x8074], 2
je 0x418c0d
jmp 0x418c57
push 0
lea edx, [ebp - 0x705c]
push edx
lea eax, [ebp - 0x3028]
push eax
call fcn.00414d20
add esp, 4
push eax
lea ecx, [ebp - 0x3028]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx*4 + 0x45c034]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
or eax, eax
je 0x418c47
jmp 0x418d35
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
je 0x418c57
jmp 0x418d35
mov dword [ebp - 0x8064], 0
push 0
push 0x27b
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str.wcstombs_s_ret__szaOutMessage__4096__szOutMessage____size_t__1__
push 0x22
push 0x16
push 0xffffffffffffffff
lea ecx, [ebp - 0x3028]
push ecx
push 0x1000
lea edx, [ebp - 0x8060]
push edx
lea eax, [ebp - 0x8064]
push eax
call 0x425260
add esp, 0x14
push eax
call fcn.0040d740
add esp, 0x20
mov dword [ebp - 0x8068], eax
cmp dword [ebp - 0x8068], 0
je 0x418cf5
cmp dword [ebp - 0x8068], 0x50
je 0x418cf5
push 0
lea ecx, [ebp - 0x705c]
push ecx
lea edx, [ebp - 0x3028]
push edx
call fcn.00414d20
add esp, 4
shl eax, 1
push eax
lea eax, [ebp - 0x3028]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0x45c034]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x418d35
cmp dword [ebp - 0x8064], 0
jbe 0x418d0d
mov eax, dword [ebp - 0x8064]
sub eax, 1
mov dword [ebp - 0x8064], eax
push 0
lea ecx, [ebp - 0x705c]
push ecx
mov edx, dword [ebp - 0x8064]
push edx
lea eax, [ebp - 0x8060]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0x45c034]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
mov ecx, dword [eax*4 + 0x45c028]
and ecx, 2
je 0x418d51
lea edx, [ebp - 0x3028]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp + 8]
mov ecx, dword [eax*4 + 0x45c028]
and ecx, 4
je 0x418dd9
xor edx, edx
mov word [ebp - 0x5030], dx
cmp dword [ebp + 0x10], 0
je 0x418da8
push 0
push 0x299
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgrptt.c
push str._VCrtDbgReportW
push str._itow_s_nLine__szLineMessage__4096__10_
push 0xa
push 0x1000
lea eax, [ebp - 0x5030]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00425cb0
add esp, 0x10
push eax
call fcn.00408050
add esp, 0x18
lea edx, [ebp - 0x7030]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
neg ecx
sbb ecx, ecx
lea edx, [ebp - 0x5030]
and ecx, edx
push ecx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00410050
add esp, 0x14
mov dword [ebp - 0x1024], eax
mov dword [ebp - 4], 0xfffffffe
call fcn.00418de7
jmp 0x418df9
mov eax, dword [ebp - 0x1024]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00411b10
push ebp
pop esp
pop ebp
ret