Function at 0x40c4b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x433040
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x2f8
mov eax, dword [0x45da50]
xor eax, ebp
mov dword [ebp - 0xec], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040c350
mov dword [ebp - 0x2b4], eax
mov ecx, dword [ebp - 0x2b4]
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x24], 0
jne 0x40c8ba
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
mov dword [ebp - 0x2b8], eax
mov byte [ebp - 4], 1
push 0x30
push 0
lea eax, [ebp - 0x60]
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_short_int_const____thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::c_str_void_const]
mov dword [ebp - 0x2bc], eax
lea ecx, [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x2bc]
push edx
call dword [sym.imp.MSVCR80.dll__wstat64i32]
add esp, 8
cmp dword [ebp - 0x4c], 0
jne 0x40c586
mov byte [ebp - 0x22d], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov al, byte [ebp - 0x22d]
jmp 0x40cce5
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_short_int_const____thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::c_str_void_const]
mov dword [ebp - 0x2c0], eax
push 0x43fe98
mov eax, dword [ebp - 0x2c0]
push eax
call dword [sym.imp.MSVCR80.dll__wfopen]
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x40c5d8
mov byte [ebp - 0x22e], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov al, byte [ebp - 0x22e]
jmp 0x40cce5
mov ecx, dword [ebp - 0x4c]
add ecx, 1
push ecx
call fcn.00430f3b
add esp, 4
mov dword [ebp - 0x2c4], eax
mov edx, dword [ebp - 0x2c4]
mov dword [ebp - 0x234], edx
mov eax, dword [ebp - 0x234]
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0
jne 0x40c630
mov byte [ebp - 0x235], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov al, byte [ebp - 0x235]
jmp 0x40cce5
mov ecx, dword [ebp - 0x4c]
add ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x110]
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x2c]
push eax
push 1
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x110]
push edx
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x10
mov eax, dword [ebp - 0x110]
add eax, dword [ebp - 0x4c]
mov byte [eax], 0
mov eax, dword [ebp - 0x4c]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00430f3b
add esp, 4
mov dword [ebp - 0x2c8], eax
mov eax, dword [ebp - 0x2c8]
mov dword [ebp - 0x23c], eax
mov ecx, dword [ebp - 0x23c]
mov dword [ebp - 0x10c], ecx
cmp dword [ebp - 0x10c], 0
jne 0x40c704
cmp dword [ebp - 0x110], 0
je 0x40c6e2
mov edx, dword [ebp - 0x110]
mov dword [ebp - 0x240], edx
mov eax, dword [ebp - 0x240]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x110], 0
mov byte [ebp - 0x241], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov al, byte [ebp - 0x241]
jmp 0x40cce5
mov ecx, dword [ebp - 0x4c]
lea edx, [ecx + ecx + 2]
push edx
push 0
mov eax, dword [ebp - 0x10c]
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x10c]
push edx
mov eax, dword [ebp - 0x110]
push eax
call sub.MSVCR80.dll_strlen
add esp, 4
push eax
mov ecx, dword [ebp - 0x110]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x10c]
mov word [eax + edx*2], 0
push 1
push 3
lea ecx, [ebp - 0xe8]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_stringstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_int_]
mov dword [ebp - 0x2cc], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xe8]
test ecx, ecx
je 0x40c78a
lea edx, [ebp - 0xe0]
mov dword [ebp - 0x2d0], edx
jmp 0x40c794
mov dword [ebp - 0x2d0], 0
mov eax, dword [ebp - 0x10c]
push eax
mov ecx, dword [ebp - 0x2d0]
push ecx
call fcn.00404550
add esp, 8
mov dword [ebp - 0x2d4], eax
push 0x43fd64
mov edx, dword [ebp - 0x2d4]
push edx
call fcn.00404550
add esp, 8
lea eax, [ebp - 0x260]
push eax
lea ecx, [ebp - 0xe8]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____thiscall_std::basic_stringstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::str_void_]
mov dword [ebp - 0x2d8], eax
mov ecx, dword [ebp - 0x2d8]
mov dword [ebp - 0x2dc], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x2dc]
push edx
mov ecx, dword [ebp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x260]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
cmp dword [ebp - 0x2c], 0
je 0x40c827
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x10c], 0
je 0x40c855
mov ecx, dword [ebp - 0x10c]
mov dword [ebp - 0x264], ecx
mov edx, dword [ebp - 0x264]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x10c], 0
cmp dword [ebp - 0x110], 0
je 0x40c883
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x268], eax
mov ecx, dword [ebp - 0x268]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x110], 0
mov byte [ebp - 0x269], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xe8]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_stringstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::vbase_dtor_void_]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov al, byte [ebp - 0x269]
jmp 0x40cce5
cmp dword [ebp - 0x24], 1
jne 0x40ca96
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x288]
push eax
call fcn.0040b5d0
mov dword [ebp - 0x2e0], eax
mov ecx, dword [ebp - 0x2e0]
mov dword [ebp - 0x2e4], ecx
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x2e4]
call dword [sym.imp.MSVCP80.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov dword [ebp - 0x2e8], eax
push 1
push 0x40
push 1
mov edx, dword [ebp - 0x2e8]
push edx
lea ecx, [ebp - 0x228]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ifstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int__::constructor_char_const___int__int_]
mov dword [ebp - 0x2ec], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x288]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 4]
lea ecx, [ebp + ecx - 0x228]
call dword [sym.imp.MSVCP80.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
mov byte [ebp - 0x2ed], al
movzx edx, byte [ebp - 0x2ed]
test edx, edx
je 0x40c974
mov byte [ebp - 0x289], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x228]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ifstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int__::vbase_dtor_void_]
mov al, byte [ebp - 0x289]
jmp 0x40cce5
push 0x3f
push 0x43fe8c
lea ecx, [ebp - 0x22c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::locale::constructor_char_const___int_]
mov dword [ebp - 0x2f4], eax
mov byte [ebp - 4], 7
push 0
call dword [sym.imp.MSVCP80.dll_public:_static_bool___cdecl_std::ios_base::sync_with_stdio_bool_]
add esp, 4
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x290]
push ecx
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 4]
lea ecx, [ebp + eax - 0x228]
call dword [sym.imp.MSVCP80.dll_public:_class_std::locale___thiscall_std::basic_ios_unsigned_short_int__struct_std::char_traits_unsigned_short_int__::imbue_class_std::locale_const__]
lea ecx, [ebp - 0x290]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::locale::destructor_void_]
push 1
push 3
lea ecx, [ebp - 0x198]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_stringstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_int_]
mov dword [ebp - 0x2f8], eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x228]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_filebuf_unsigned_short_int__struct_std::char_traits_unsigned_short_int______thiscall_std::basic_ifstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int__::rdbuf_void_const]
mov dword [ebp - 0x2fc], eax
mov ecx, dword [ebp - 0x2fc]
push ecx
lea ecx, [ebp - 0x190]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_unsigned_short_int__struct_std::char_traits_unsigned_short_int______thiscall_std::basic_ostream_unsigned_short_int__struct_std::char_traits_unsigned_short_int__::operator___class_std::basic_streambuf_unsigned_short_int__struct_std::char_traits_unsigned_short_int____]
lea edx, [ebp - 0x2ac]
push edx
lea ecx, [ebp - 0x198]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____thiscall_std::basic_stringstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::str_void_]
mov dword [ebp - 0x300], eax
mov eax, dword [ebp - 0x300]
mov dword [ebp - 0x304], eax
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x304]
push ecx
mov ecx, dword [ebp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x2ac]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov byte [ebp - 0x2ad], 1
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x198]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_stringstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::vbase_dtor_void_]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x22c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::locale::destructor_void_]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x228]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ifstream_unsigned_short_int__struct_std::char_traits_unsigned_short_int__::vbase_dtor_void_]
mov al, byte [ebp - 0x2ad]
jmp 0x40cce5
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040cd10
mov byte [ebp - 0x305], al
movzx edx, byte [ebp - 0x305]
test edx, edx
jne 0x40cacd
xor al, al
jmp 0x40cce5
mov byte [ebp - 0x15], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], 4
jle 0x40cb9e
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx]
cmp edx, 0xeffe
jne 0x40cb11
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 2]
test ecx, ecx
jne 0x40cb11
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 2
jmp 0x40cb99
mov edx, dword [ebp - 0x28]
movzx eax, word [edx]
test eax, eax
jne 0x40cb37
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx + 2]
cmp edx, 0xfeff
jne 0x40cb37
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 2
jmp 0x40cb99
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax]
cmp ecx, 0xefbb
jne 0x40cb65
mov edx, dword [ebp - 0x28]
movzx eax, word [edx + 2]
or eax, 0xff00
cmp eax, 0xbf
jne 0x40cb65
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 3
jmp 0x40cb99
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx]
cmp edx, 0xfeff
jne 0x40cb80
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 1
jmp 0x40cb99
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax]
cmp ecx, 0xfffe
jne 0x40cb99
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 1
jmp 0x40cc76
cmp dword [ebp - 0x20], 3
jle 0x40cc20
mov edx, dword [ebp - 0x28]
movzx eax, word [edx]
cmp eax, 0xefbb
jne 0x40cbcd
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx + 2]
cmp edx, 0xbf
jne 0x40cbcd
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 3
jmp 0x40cc1e
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax]
cmp ecx, 0xfe
jne 0x40cbf6
mov edx, dword [ebp - 0x28]
movzx eax, word [edx + 2]
cmp eax, 0xff
jne 0x40cbf6
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 2
jmp 0x40cc1e
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx]
cmp edx, 0xff
jne 0x40cc1e
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 2]
cmp ecx, 0xfe
jne 0x40cc1e
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 2
jmp 0x40cc76
cmp dword [ebp - 0x20], 2
jle 0x40cc76
mov edx, dword [ebp - 0x28]
movzx eax, word [edx]
cmp eax, 0xfe
jne 0x40cc4f
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx + 2]
cmp edx, 0xff
jne 0x40cc4f
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 2
jmp 0x40cc76
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax]
cmp ecx, 0xff
jne 0x40cc76
mov edx, dword [ebp - 0x28]
movzx eax, word [edx + 2]
cmp eax, 0xfe
jne 0x40cc76
mov byte [ebp - 0x15], 1
mov dword [ebp - 0x14], 2
movzx ecx, byte [ebp - 0x15]
test ecx, ecx
je 0x40cc8a
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [eax + edx*2]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
push edx
mov ecx, dword [ebp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::operator_unsigned_short_int_const__]
push 0x43fd64
mov ecx, dword [ebp + 0xc]
call dword [0x43724c]
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
jmp 0x40ccd2
mov dword [ebp - 4], 0xffffffff
jmp 0x40cce3
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xec]
xor ecx, ebp
call fcn.00430f9c
mov esp, ebp
pop ebp
ret 8