Function at 0x52881b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x5f2e68]
xor eax, ebp
mov dword [ebp - 4], 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, [ebp - 0x1f]
mov byte [ebp - 0x20], 0
rep stosd dword es:[edi], eax
push 0x103
mov byte [ebp - 0x128], al
xor edi, edi
lea eax, [ebp - 0x127]
push edi
push eax
mov dword [ebp - 0x144], esi
call fcn.005306b0
add esp, 0xc
mov edx, esi
mov dword [ebp - 0x138], edi
call fcn.004ccc0d
test eax, eax
jne 0x528e44
cmp ebx, edi
je 0x528e44
cmp dword [ebx + 0x90], edi
je 0x5288a0
cmp dword [ebx + 0x8c], edi
jle 0x5288a0
push str.:5:LoadSales___has_detected_a_potential_memory_leak:_Extended_emp_sales_data_has_not_been_freed_
call fcn.0042bd38
pop ecx
push 0x300c
push edi
push ebx
call fcn.005306b0
add esp, 0xc
push esi
mov ecx, 0x104
lea eax, [ebp - 0x128]
call fcn.004ccc3f
pop ecx
mov edx, eax
call fcn.004cd7e8
mov eax, edx
push eax
mov esi, 0x5528c8
call fcn.004ccd4e
mov esi, eax
neg esi
sbb esi, esi
inc esi
pop ecx
mov dword [ebp - 0x130], esi
call fcn.004935a3
test eax, eax
je 0x5288f4
mov dword [ebp - 0x130], edi
mov esi, edi
cmp esi, edi
mov dword [ebp - 0x140], edi
je 0x528a37
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x20]
push eax
push 0x19
pop eax
call fcn.0046ab1d
add esp, 0x18
lea edx, [ebp - 0x20]
call fcn.004ccc0d
test eax, eax
jne 0x528942
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x128]
push eax
call fcn.004cd9f0
test eax, eax
pop ecx
pop ecx
je 0x528942
mov dword [ebp - 0x140], 1
call fcn.00531157
push eax
push edi
push edi
call fcn.00493154
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x128]
push str._stemp_d.sls
push eax
call fcn.00531b2f
add esp, 0x10
cmp dword [ebp - 0x140], edi
je 0x528987
cmp dword [ebp + 0x10], edi
je 0x528987
push 0x286
push str..GetSalesSa7.c
push 0x40
call fcn.00474c00
add esp, 0xc
call fcn.004fa8e4
mov esi, dword [ebp - 0x144]
push edi
lea edx, [ebp - 0x128]
mov ecx, esi
mov dword [ebp - 0x134], eax
call fcn.004315a3
cmp eax, edi
pop ecx
jne 0x528a22
push 0x4e20
mov ecx, esi
call fcn.0043232a
test eax, eax
pop ecx
jne 0x5289dd
cmp dword [ebp - 0x140], edi
je 0x528e44
cmp dword [ebp + 0x10], edi
je 0x528e44
push 0x40
call fcn.00475a9e
jmp 0x528e43
call fcn.004fa8e4
sub eax, dword [ebp - 0x134]
cmp eax, 0x1388
jae 0x528a0d
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
lea edx, [ebp - 0x128]
mov ecx, esi
call fcn.004315a3
cmp eax, edi
pop ecx
jne 0x528a22
lea eax, [ebp - 0x128]
push eax
push esi
push str.:7:LoadSales___FAILED_to_CopyFileSafe___s_____s___0__
call fcn.0042bd38
add esp, 0xc
cmp dword [ebp - 0x140], edi
je 0x528a37
cmp dword [ebp + 0x10], edi
je 0x528a37
push 0x40
call fcn.00475a9e
pop ecx
push 0x29c
push str..GetSalesSa7.c
mov edx, 0x54f4b8
lea ecx, [ebp - 0x128]
call fcn.00434df1
mov esi, eax
cmp esi, edi
pop ecx
pop ecx
mov dword [ebp - 0x134], esi
je 0x528e44
push esi
push 1
lea eax, [ebp - 0x138]
push 4
push eax
call fcn.00530e93
add esp, 0x10
cmp eax, 1
jne 0x528e21
mov ecx, dword [ebp - 0x138]
cmp ecx, edi
je 0x528e21
mov edi, 0x300c
cmp ecx, edi
jbe 0x528aae
push edi
push ecx
push str.:7:LoadSales___will_fail:_SALESPARAMS_has_decreased_in_size_from__d_to__d.
call fcn.0042bd38
mov ecx, edi
add esp, 0xc
mov dword [ebp - 0x138], ecx
push esi
add ecx, 0xfffffffc
push ecx
lea eax, [ebx + 4]
push 1
push eax
call fcn.00530e93
mov edi, eax
mov eax, dword [ebp - 0x138]
xor esi, esi
add esp, 0x10
add edi, 4
mov dword [ebx], eax
mov dword [ebx + 0x90], esi
call fcn.0052a951
cmp eax, 0x96
jle 0x528b09
call fcn.004935a3
test eax, eax
je 0x528af7
call fcn.0052a951
cmp eax, 0x12c0
jle 0x528b09
call fcn.0052a951
push eax
push str.:8:LoadSalesSub___has_detected_a_potential_memory_leak____d_units_
call fcn.0042bd38
pop ecx
pop ecx
mov eax, dword [ebx + 0x8c]
cmp eax, esi
mov dword [ebp - 0x13c], esi
jle 0x528c2b
cmp eax, 0x1f4
jle 0x528b2c
push eax
push str.:7:LoadSales___FAILED:_iNumIndividualEmps___d_is_corrupt_
jmp 0x528b4f
shl eax, 6
push eax
call fcn.00532823
cmp eax, esi
pop ecx
mov dword [ebx + 0x90], eax
jne 0x528b5b
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.0042b70b
pop ecx
pop ecx
jmp 0x528c2b
cmp dword [ebx + 0x8c], esi
mov dword [ebp - 0x13c], 1
mov dword [ebp - 0x12c], esi
jle 0x528c2b
push dword [ebp - 0x134]
lea eax, [ebp - 0x138]
push 1
push 4
push eax
call fcn.00530e93
add esp, 0x10
cmp eax, 1
jne 0x528bf2
mov eax, dword [ebp - 0x138]
test eax, eax
je 0x528c12
cmp eax, 0x40
ja 0x528c12
push dword [ebp - 0x134]
add eax, 0xfffffffc
push 1
push eax
mov eax, dword [ebx + 0x90]
lea eax, [esi + eax + 4]
push eax
call fcn.00530e93
mov edx, dword [ebx + 0x90]
add esp, 0x10
cmp eax, 1
push 0x40
pop ecx
mov dword [esi + edx], ecx
jne 0x528bff
add edi, dword [ebp - 0x138]
inc dword [ebp - 0x12c]
mov eax, dword [ebp - 0x12c]
add esi, ecx
cmp eax, dword [ebx + 0x8c]
jl 0x528b77
jmp 0x528c29
push str.:7:LoadSales___FAILED:_fread___failed_to_load_the_EMPSALESPARAMS_dwSize.
call fcn.0042b70b
pop ecx
jmp 0x528c22
push dword [ebp - 0x12c]
push str.:7:LoadSales___FAILED:_fread___failed_to_load_emp_index__d.
call fcn.0042b70b
pop ecx
jmp 0x528bfc
push 0x40
push eax
push str.:7:LoadSales___FAILED:_The_EMPSALESPARAMS_dwSize__ld_is_invalid___Current_size_is__ld.
call fcn.0042b70b
add esp, 0xc
and dword [ebp - 0x13c], 0
xor esi, esi
mov ecx, dword [ebp - 0x134]
call fcn.00435239
cmp dword [ebp - 0x130], esi
je 0x528c49
lea eax, [ebp - 0x128]
call fcn.004314ff
mov ecx, dword [ebx]
xor eax, eax
neg ecx
cmp edi, esi
mov dword [ebp - 0x12c], esi
mov dword [ebp - 0x134], eax
jle 0x528ccb
mov dword [ebp - 0x130], ebx
sub dword [ebp - 0x130], ecx
cmp eax, 4
jb 0x528c75
cmp eax, 8
jb 0x528cba
cmp eax, 0x90
jl 0x528c83
cmp eax, 0x94
jl 0x528cba
add eax, ecx
cmp eax, esi
jl 0x528caa
cmp dword [ebp - 0x13c], esi
je 0x528cba
mov edx, dword [ebx + 0x8c]
shl edx, 6
cmp eax, edx
jge 0x528cba
mov edx, dword [ebx + 0x90]
movzx eax, byte [eax + edx]
jmp 0x528cb4
mov edx, dword [ebp - 0x130]
movzx eax, byte [edx + eax]
add dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x134]
inc eax
cmp eax, edi
mov dword [ebp - 0x134], eax
jl 0x528c6b
add dword [ebp - 0x12c], edi
cmp dword [ebp - 0x13c], esi
mov dword [ebx + 0xc], esi
mov dword [ebx + 0x10], esi
mov dword [ebx + 0x20], esi
jne 0x528cff
mov eax, dword [ebx + 0x90]
cmp eax, esi
mov dword [ebx + 0x8c], esi
je 0x528cf9
push eax
call fcn.0053061e
pop ecx
mov dword [ebx + 0x90], esi
mov eax, dword [ebp - 0x12c]
lea edi, [ebx + 4]
cmp eax, dword [edi]
mov dword [ebx], 0x300c
je 0x528e0b
cmp dword [0x710b64], esi
mov eax, dword [ebx + 0x90]
mov dword [ebx + 0x8c], esi
jne 0x528dc6
cmp eax, esi
je 0x528d39
push eax
call fcn.0053061e
pop ecx
cmp dword [ebp - 0x140], esi
mov dword [ebx + 0x90], esi
mov dword [ebp - 0x130], esi
je 0x528d72
cmp dword [ebp + 0x10], esi
jne 0x528d72
push esi
push 0x40
call fcn.00474b45
test eax, eax
pop ecx
pop ecx
je 0x528d72
push 0x40
mov dword [ebp - 0x130], 1
call fcn.00475a9e
pop ecx
push 0x368
mov edi, str..GetSalesSa7.c
push edi
push 0x40
call fcn.00471db5
add esp, 0xc
cmp dword [ebp - 0x130], esi
je 0x528d9f
push 0x36a
push edi
push 0x40
call fcn.00474c00
add esp, 0xc
push dword [ebp + 0x10]
mov dword [0x710b64], 1
push dword [ebp - 0x144]
push ebx
call fcn.0052881b
add esp, 0xc
mov dword [0x710b64], esi
jmp 0x528e46
cmp eax, esi
je 0x528dd1
push eax
call fcn.0053061e
pop ecx
mov al, byte [0x60b96a]
inc byte [0x60b96a]
cmp al, 0xa
mov dword [ebx + 0x90], esi
jae 0x528e44
push dword [ebp - 0x12c]
movzx eax, byte [0x60b96a]
push dword [edi]
push dword [ebp - 0x144]
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.0042b70b
add esp, 0x14
jmp 0x528e44
mov ebx, dword [ebx + 0x90]
cmp ebx, esi
je 0x528e1c
mov esi, ebx
call fcn.0052a8de
xor eax, eax
inc eax
jmp 0x528e46
mov ecx, esi
call fcn.00435239
push edi
xor edx, edx
lea ecx, [ebp - 0x128]
call fcn.004328fa
pop ecx
push eax
push str.:7:LoadSales___FAILED_to_read_the_size_of_the_sales_file.__GetFileSize_____ld.
call fcn.0042b70b
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret