Function at 0x4b5223
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
mov eax, dword [0x5385d0]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 6
pop ecx
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], 0
rep stosd dword es:[edi], eax
push 0x103
mov byte [esp + 0x4c], al
xor edi, edi
lea eax, [esp + 0x4d]
push edi
push eax
mov dword [esp + 0x2c], esi
call fcn.004b7880
add esp, 0xc
mov edx, esi
mov dword [esp + 0x18], edi
call fcn.0047ebaf
test eax, eax
jne 0x4b57bf
cmp ebx, edi
je 0x4b57bf
cmp dword [ebx + 0x90], edi
je 0x4b52a9
cmp dword [ebx + 0x8c], edi
jle 0x4b52a9
push str.:5:LoadSales___has_detected_a_potential_memory_leak:_Extended_emp_sales_data_has_not_been_freed_
call fcn.0041936e
pop ecx
push 0x300c
push edi
push ebx
call fcn.004b7880
add esp, 0xc
push esi
mov ecx, 0x104
lea eax, [esp + 0x4c]
call fcn.0047ebe1
pop ecx
mov edx, eax
call fcn.0047f68c
mov eax, edx
push eax
mov esi, 0x4d69b8
call fcn.0047ecf0
mov esi, eax
neg esi
sbb esi, esi
inc esi
cmp esi, edi
pop ecx
mov dword [esp + 0x28], edi
je 0x4b5415
push edi
push edi
push edi
push edi
push edi
lea eax, [esp + 0x40]
push eax
push 0x19
pop eax
call fcn.00441fbf
add esp, 0x18
lea edx, [esp + 0x2c]
call fcn.0047ebaf
test eax, eax
jne 0x4b532f
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.0047f83d
test eax, eax
pop ecx
pop ecx
je 0x4b532f
mov dword [esp + 0x28], 1
call fcn.004b7d0d
push eax
push edi
push edi
call fcn.004610ab
pop ecx
pop ecx
push eax
lea eax, [esp + 0x50]
push str._stemp_d.sls
push eax
call fcn.004b77ce
add esp, 0x10
cmp dword [esp + 0x28], edi
je 0x4b5370
cmp dword [ebp + 0x10], edi
je 0x4b5370
push 0x286
push str..GetSalesSa7.c
push 0x40
call fcn.00448320
add esp, 0xc
call fcn.004a6bcb
mov ecx, dword [esp + 0x20]
push edi
lea edx, [esp + 0x4c]
mov dword [esp + 0x18], eax
call fcn.0041c06b
cmp eax, edi
pop ecx
jne 0x4b5402
mov ecx, dword [esp + 0x20]
push 0x4e20
call fcn.0041c6c6
test eax, eax
pop ecx
jne 0x4b53be
cmp dword [esp + 0x28], edi
je 0x4b57bf
cmp dword [ebp + 0x10], edi
je 0x4b57bf
push 0x40
call fcn.004491a9
jmp 0x4b57be
call fcn.004a6bcb
sub eax, dword [esp + 0x14]
cmp eax, 0x1388
jae 0x4b53ec
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x20]
push edi
lea edx, [esp + 0x4c]
call fcn.0041c06b
cmp eax, edi
pop ecx
jne 0x4b5402
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x24]
push str.:7:LoadSales___FAILED_to_CopyFileSafe___s_____s___0__
call fcn.0041936e
add esp, 0xc
cmp dword [esp + 0x28], edi
je 0x4b5415
cmp dword [ebp + 0x10], edi
je 0x4b5415
push 0x40
call fcn.004491a9
pop ecx
push 0x29c
push str..GetSalesSa7.c
mov edx, 0x4d520c
lea ecx, [esp + 0x50]
call fcn.0041e477
cmp eax, edi
pop ecx
pop ecx
mov dword [esp + 0x10], eax
je 0x4b57bf
push eax
push 1
lea eax, [esp + 0x20]
push 4
push eax
call fcn.004b7b96
add esp, 0x10
cmp eax, 1
jne 0x4b579c
mov ecx, dword [esp + 0x18]
cmp ecx, edi
je 0x4b579c
mov eax, 0x300c
cmp ecx, eax
jbe 0x4b5483
push eax
push ecx
push str.:7:LoadSales___will_fail:_SALESPARAMS_has_decreased_in_size_from__d_to__d.
call fcn.0041936e
mov ecx, 0x300c
add esp, 0xc
mov dword [esp + 0x18], ecx
push dword [esp + 0x10]
add ecx, 0xfffffffc
push ecx
lea eax, [ebx + 4]
push 1
push eax
call fcn.004b7b96
add eax, 4
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
add esp, 0x10
mov dword [ebx], eax
mov dword [ebx + 0x90], edi
call fcn.004b609f
cmp eax, 0x96
jle 0x4b54ca
call fcn.004b609f
push eax
push str.:8:LoadSalesSub___has_detected_a_potential_memory_leak____d_units_
call fcn.0041936e
pop ecx
pop ecx
mov eax, dword [ebx + 0x8c]
cmp eax, edi
mov dword [esp + 0x1c], edi
jle 0x4b55d8
cmp eax, 0x1f4
jle 0x4b54eb
push eax
push str.:7:LoadSales___FAILED:_iNumIndividualEmps___d_is_corrupt_
jmp 0x4b550e
shl eax, 6
push eax
call fcn.004b7e07
cmp eax, edi
pop ecx
mov dword [ebx + 0x90], eax
jne 0x4b551a
mov eax, dword [ebx + 0x8c]
shl eax, 6
push eax
push str.:7:LoadSales___FAILED:_malloc__ld__FAILED_to_allocate_individual_employee_details_
call fcn.00418e96
pop ecx
pop ecx
jmp 0x4b55d8
cmp dword [ebx + 0x8c], edi
mov dword [esp + 0x1c], 1
mov dword [esp + 0x14], edi
jle 0x4b55d8
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push 1
push 4
push eax
call fcn.004b7b96
add esp, 0x10
cmp eax, 1
jne 0x4b55a3
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4b55c1
cmp eax, 0x40
ja 0x4b55c1
push dword [esp + 0x10]
add eax, 0xfffffffc
push 1
push eax
mov eax, dword [ebx + 0x90]
lea eax, [edi + eax + 4]
push eax
call fcn.004b7b96
mov edx, dword [ebx + 0x90]
add esp, 0x10
cmp eax, 1
push 0x40
pop ecx
mov dword [edi + edx], ecx
jne 0x4b55b0
mov eax, dword [esp + 0x18]
add dword [esp + 0x24], eax
inc dword [esp + 0x14]
mov eax, dword [esp + 0x14]
add edi, ecx
cmp eax, dword [ebx + 0x8c]
jl 0x4b5532
jmp 0x4b55d6
push str.:7:LoadSales___FAILED:_fread___failed_to_load_the_EMPSALESPARAMS_dwSize.
call fcn.00418e96
pop ecx
jmp 0x4b55d1
push dword [esp + 0x14]
push str.:7:LoadSales___FAILED:_fread___failed_to_load_emp_index__d.
call fcn.00418e96
pop ecx
jmp 0x4b55ad
push 0x40
push eax
push str.:7:LoadSales___FAILED:_The_EMPSALESPARAMS_dwSize__ld_is_invalid___Current_size_is__ld.
call fcn.00418e96
add esp, 0xc
and dword [esp + 0x1c], 0
xor edi, edi
mov ecx, dword [esp + 0x10]
call fcn.0041e8bf
cmp esi, edi
je 0x4b55ee
lea eax, [esp + 0x48]
call fcn.0041bfc0
mov ecx, dword [ebx]
xor edx, edx
neg ecx
cmp dword [esp + 0x24], edi
mov dword [esp + 0x10], edi
jle 0x4b5659
mov dword [esp + 0x14], ebx
sub dword [esp + 0x14], ecx
cmp edx, 4
jb 0x4b5610
cmp edx, 8
jb 0x4b5652
cmp edx, 0x90
jl 0x4b5620
cmp edx, 0x94
jl 0x4b5652
lea eax, [ecx + edx]
cmp eax, edi
jl 0x4b5646
cmp dword [esp + 0x1c], edi
je 0x4b5652
mov esi, dword [ebx + 0x8c]
shl esi, 6
cmp eax, esi
jge 0x4b5652
mov esi, dword [ebx + 0x90]
movzx eax, byte [eax + esi]
jmp 0x4b564e
mov esi, dword [esp + 0x14]
movzx eax, byte [esi + eax]
add dword [esp + 0x10], eax
inc edx
cmp edx, dword [esp + 0x24]
jl 0x4b5606
mov eax, dword [esp + 0x24]
add dword [esp + 0x10], eax
cmp dword [esp + 0x1c], edi
mov dword [ebx + 0xc], edi
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x20], edi
jne 0x4b568d
mov eax, dword [ebx + 0x90]
cmp eax, edi
mov dword [ebx + 0x8c], edi
je 0x4b5687
push eax
call fcn.004b651e
pop ecx
mov dword [ebx + 0x90], edi
mov eax, dword [esp + 0x10]
lea esi, [ebx + 4]
cmp eax, dword [esi]
mov dword [ebx], 0x300c
je 0x4b5786
cmp dword [0x64a710], edi
mov eax, dword [ebx + 0x90]
mov dword [ebx + 0x8c], edi
jne 0x4b5745
cmp eax, edi
je 0x4b56c5
push eax
call fcn.004b651e
pop ecx
cmp dword [esp + 0x28], edi
mov dword [ebx + 0x90], edi
mov dword [esp + 0x14], edi
je 0x4b56f8
cmp dword [ebp + 0x10], edi
jne 0x4b56f8
push edi
push 0x40
call fcn.0044825e
test eax, eax
pop ecx
pop ecx
je 0x4b56f8
push 0x40
mov dword [esp + 0x18], 1
call fcn.004491a9
pop ecx
push 0x368
mov esi, str..GetSalesSa7.c
push esi
push 0x40
call fcn.00445628
add esp, 0xc
cmp dword [esp + 0x14], edi
je 0x4b5723
push 0x36a
push esi
push 0x40
call fcn.00448320
add esp, 0xc
push dword [ebp + 0x10]
mov dword [0x64a710], 1
push dword [esp + 0x24]
push ebx
call fcn.004b5223
add esp, 0xc
mov dword [0x64a710], edi
jmp 0x4b57c1
cmp eax, edi
je 0x4b5750
push eax
call fcn.004b651e
pop ecx
mov al, byte [0x54f1f2]
inc byte [0x54f1f2]
cmp al, 0xa
mov dword [ebx + 0x90], edi
jae 0x4b57bf
push dword [esp + 0x10]
movzx eax, byte [0x54f1f2]
push dword [esi]
push dword [esp + 0x28]
push eax
push str.:5:__d_of_10:_LoadSales___s___FAILED:_The_checksum_failed:_Should_be__ld__but_was_calculated_to_be__ld.
call fcn.00418e96
add esp, 0x14
jmp 0x4b57bf
mov ebx, dword [ebx + 0x90]
cmp ebx, edi
je 0x4b5797
mov esi, ebx
call fcn.004b602d
xor eax, eax
inc eax
jmp 0x4b57c1
mov ecx, dword [esp + 0x10]
call fcn.0041e8bf
push edi
xor edx, edx
lea ecx, [esp + 0x4c]
call fcn.0041cc74
pop ecx
push eax
push str.:7:LoadSales___FAILED_to_read_the_size_of_the_sales_file.__GetFileSize_____ld.
call fcn.00418e96
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [esp + 0x154]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b7140
mov esp, ebp
pop ebp
ret