Function at 0x43c940
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x461be9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], 0
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0xa4]
mov edx, dword [esp + 0xa0]
stosw word es:[edi], ax
mov ecx, dword [ebx + 0xc]
stosb byte es:[edi], al
mov eax, dword [ebx]
push eax
push 1
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
mov eax, dword [ebx + 0xc]
cdq
sete cl
idiv dword [ebx + 0x10]
test cl, cl
mov byte [esp + 0x12], cl
mov dword [ebx + 0x14], eax
je 0x43cbeb
push eax
lea eax, [esp + 0x30]
push 0x475e5c
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebp, [ebx + 0x18]
mov esi, ecx
push 1
push esi
mov ecx, ebp
mov dword [esp + 0x20], esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43ca0f
mov edi, dword [ebp + 4]
mov ecx, esi
mov edx, ecx
lea esi, [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
add eax, ecx
mov byte [eax], 0
mov ecx, dword [ebx + 0x10]
mov edi, dword [ebx + 0x14]
mov esi, dword [esp + 0xa0]
xor eax, eax
cmp ecx, 1
mov edx, edi
sete byte [esp + 0x13]
dec edi
mov dword [esp + 0x14], eax
test edx, edx
je 0x43cb4a
inc edi
mov dword [esp + 0x18], edi
mov edi, dword [sym.imp.MSVCRT.dll_memmove]
mov dl, byte [esp + 0x13]
test dl, dl
je 0x43ca4e
xor edx, edx
cmp byte [esi], dl
jmp 0x43ca53
xor edx, edx
cmp word [esi], dx
sete dl
test edx, edx
je 0x43ca84
test eax, eax
je 0x43ca75
cmp esi, eax
je 0x43ca75
imul ecx, dword [esp + 0x14]
mov edx, esi
sub edx, eax
push edx
push eax
sub eax, ecx
push eax
call edi
add esp, 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x10]
inc edx
lea eax, [ecx + esi]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
add esi, ecx
dec edx
mov dword [esp + 0x18], edx
jne 0x43ca40
test eax, eax
je 0x43cab1
cmp esi, eax
je 0x43cab1
mov ecx, dword [ebx + 0x10]
sub esi, eax
push esi
mov esi, dword [esp + 0x18]
imul ecx, esi
push eax
sub eax, ecx
push eax
call edi
add esp, 0xc
jmp 0x43cab5
mov esi, dword [esp + 0x14]
test esi, esi
je 0x43cb4a
push esi
lea edx, [esp + 0x30]
push 0x475e48
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ebp + 8]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [eax]
sub ecx, edx
cmp ecx, esi
ja 0x43caf7
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x43cb3e
mov eax, dword [ebp + 8]
push 0
add eax, esi
mov ecx, ebp
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43cb3e
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 4]
add edi, ecx
mov ecx, esi
mov edx, ecx
lea esi, [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 4]
add eax, ecx
mov dword [ebp + 8], ecx
mov byte [eax], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x14]
sub ecx, eax
mov dword [ebx + 0x14], ecx
cmp dword [ebx + 0x10], 1
jle 0x43cc3d
mov ecx, dword [ebx + 4]
push ecx
call fcn.0043c1e0
add esp, 4
test al, al
je 0x43cc3d
mov edx, dword [ebx + 0x14]
mov eax, dword [esp + 0xa0]
push edx
push eax
call fcn.0043c1f0
mov edi, 0x475e38
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
sub edx, ecx
cmp edx, esi
ja 0x43cba4
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x43cc3d
mov ebx, dword [ebp + 8]
push 0
add ebx, esi
mov ecx, ebp
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43cc3d
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 4]
mov ecx, esi
add edi, eax
mov eax, ecx
mov esi, 0x475e38
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 8], ebx
mov ebp, dword [ebp + 4]
add ebp, ebx
mov byte [ebp], 0
jmp 0x43cc3d
lea ecx, [esp + 0x1c]
push ecx
call fcn.00438ee0
add esp, 4
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov dword [esp + 0x98], 0
mov ecx, dword [edx]
push ecx
push 0
push eax
lea ecx, [ebx + 0x18]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x43cc3d
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x43cc34
cmp al, 0xff
je 0x43cc34
dec al
mov byte [ecx], al
jmp 0x43cc3d
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x90]
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x8c
ret