Function at 0x4140d9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
mov eax, dword [0x4cc8c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 6
pop ecx
xor eax, eax
mov ebx, dword [ebp + 0xc]
lea edi, [ebp - 0x20]
mov esi, dword [ebp + 8]
rep stosd dword es:[edi], eax
push 0x104
mov dword [ebp - 0x134], ebx
stosb byte es:[edi], al
lea eax, [ebp - 0x124]
xor edi, edi
push edi
push eax
call fcn.00466ad0
push ebx
mov dword [ebp - 0x12c], edi
call fcn.00451684
add esp, 0x10
test eax, eax
jne 0x414734
test esi, esi
je 0x414734
cmp dword [esi + 0x90], edi
je 0x414154
cmp dword [esi + 0x8c], edi
jle 0x414154
push str.:5:LoadSales___has_detected_a_potential_memory_leak:_Extended_emp_sales_data_has_not_been_freed_
call fcn.0040d9e1
pop ecx
push 0x300c
push edi
push esi
call fcn.00466ad0
push 0x104
lea eax, [ebp - 0x124]
push ebx
push eax
call fcn.00452b01
lea eax, [ebp - 0x124]
push eax
call fcn.0045201f
lea eax, [ebp - 0x124]
push 0x48a244
push eax
call fcn.004529a0
add esp, 0x24
test eax, eax
jne 0x4142f8
push 0x19
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.0042c358
lea eax, [ebp - 0x20]
mov dword [ebp - 0x140], 1
push eax
mov dword [ebp - 0x13c], edi
call fcn.00451684
add esp, 0x20
test eax, eax
jne 0x414203
lea eax, [ebp - 0x20]
mov dword [ebp - 0x140], 1
push eax
lea eax, [ebp - 0x124]
xor edi, edi
push eax
mov dword [ebp - 0x13c], edi
call fcn.004529d5
pop ecx
pop ecx
test eax, eax
je 0x414203
xor eax, eax
inc eax
mov edi, eax
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x13c], edi
call fcn.00470209
push eax
push 0
push 0
call fcn.0043e284
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x124]
push str._stemp_d.sls
push eax
call fcn.0040401c
add esp, 0x10
test edi, edi
je 0x414247
cmp dword [ebp + 0x10], 0
je 0x414247
push 0x286
push str.C:UsersOfficeDocumentsVisual_StudioPAULAGetSalesSa7.c
push 0x40
call fcn.0042cf9f
add esp, 0xc
call fcn.004609ba
push 0
mov edi, eax
lea eax, [ebp - 0x124]
push 0
push eax
push ebx
call fcn.0040eec9
add esp, 0x10
test eax, eax
jne 0x4142df
push 0x4e20
push ebx
call fcn.00410a10
pop ecx
pop ecx
test eax, eax
jne 0x414299
cmp dword [ebp - 0x13c], eax
je 0x414734
cmp dword [ebp + 0x10], eax
je 0x414734
push 0x40
call fcn.00432bc5
pop ecx
jmp 0x414734
call fcn.004609ba
sub eax, edi
cmp eax, 0x1388
jae 0x4142ca
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0
lea eax, [ebp - 0x124]
push eax
push ebx
call fcn.0040eec9
add esp, 0x10
test eax, eax
jne 0x4142df
lea eax, [ebp - 0x124]
push eax
push ebx
push str.:7:LoadSales___FAILED_to_CopyFileSafe___s_____s___0__
call fcn.0040d9e1
add esp, 0xc
cmp dword [ebp - 0x13c], 0
je 0x414304
cmp dword [ebp + 0x10], 0
je 0x414304
push 0x40
call fcn.00432bc5
pop ecx
jmp 0x414304
mov dword [ebp - 0x140], edi
mov dword [ebp - 0x13c], edi
push 0x29c
push str.C:UsersOfficeDocumentsVisual_StudioPAULAGetSalesSa7.c
lea eax, [ebp - 0x124]
push 0x489570
push eax
call fcn.004137d1
mov edi, eax
add esp, 0x10
test edi, edi
je 0x414734
push edi
push 1
lea eax, [ebp - 0x12c]
push 4
push eax
call fcn.0046a8f7
add esp, 0x10
cmp eax, 1
jne 0x414710
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x414710
mov ecx, 0x300c
cmp eax, ecx
jbe 0x41437a
push ecx
push eax
push str.:7:LoadSales___will_fail:_SALESPARAMS_has_decreased_in_size_from__d_to__d.
call fcn.0040d9e1
mov eax, 0x300c
add esp, 0xc
mov dword [ebp - 0x12c], eax
push edi
add eax, 0xfffffffc
lea ecx, [esi + 4]
push eax
push 1
push ecx
call fcn.0046a8f7
push dword [0x4d7390]
and dword [esi + 0x90], 0
add eax, 4
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x12c]
mov dword [esi], eax
call fcn.00443752
add esp, 0x14
cmp eax, 0x96
jle 0x4143d0
push dword [0x4d7390]
call fcn.00443752
push eax
push str.:8:LoadSalesSub___has_detected_a_potential_memory_leak____d_units_
call fcn.0040d9e1
add esp, 0xc
and dword [ebp - 0x138], 0
mov eax, dword [esi + 0x8c]
test eax, eax
jle 0x414508
cmp eax, 0x1f4
jle 0x4143f4
push eax
push str.:7:LoadSales___FAILED:_iNumIndividualEmps___d_is_corrupt_
jmp 0x414417
shl eax, 6
push eax
call fcn.004705eb
mov dword [esi + 0x90], eax
pop ecx
test eax, eax
jne 0x414423
mov eax, dword [esi + 0x8c]
shl eax, 6
push eax
push str.:7:LoadSales___FAILED:_malloc__ld__FAILED_to_allocate_individual_employee_details_
call fcn.0040d511
pop ecx
pop ecx
jmp 0x414508
xor ebx, ebx
mov dword [ebp - 0x138], 1
cmp dword [esi + 0x8c], ebx
jle 0x414502
and dword [ebp - 0x130], ebx
push edi
push 1
lea eax, [ebp - 0x12c]
push 4
push eax
call fcn.0046a8f7
add esp, 0x10
cmp eax, 1
jne 0x4144f0
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x4144de
cmp eax, 0x40
ja 0x4144de
mov ecx, dword [ebp - 0x130]
add eax, 0xfffffffc
push edi
push 1
push eax
mov eax, dword [esi + 0x90]
add ecx, 4
add eax, ecx
push eax
call fcn.0046a8f7
mov edx, dword [ebp - 0x130]
add esp, 0x10
cmp eax, 1
mov eax, dword [esi + 0x90]
mov dword [edx + eax], 0x40
jne 0x4144d0
mov eax, dword [ebp - 0x128]
add edx, 0x40
add eax, dword [ebp - 0x12c]
inc ebx
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x130], edx
cmp ebx, dword [esi + 0x8c]
jl 0x414441
jmp 0x414502
push ebx
push str.:7:LoadSales___FAILED:_fread___failed_to_load_emp_index__d.
call fcn.0040d511
pop ecx
jmp 0x4144fa
push 0x40
push eax
push str.:7:LoadSales___FAILED:_The_EMPSALESPARAMS_dwSize__ld_is_invalid___Current_size_is__ld.
call fcn.0040d511
add esp, 0xc
jmp 0x4144fb
push str.:7:LoadSales___FAILED:_fread___failed_to_load_the_EMPSALESPARAMS_dwSize.
call fcn.0040d511
pop ecx
and dword [ebp - 0x138], 0
mov ebx, dword [ebp - 0x134]
push edi
call fcn.00413646
cmp dword [ebp - 0x140], 0
pop ecx
je 0x414525
lea eax, [ebp - 0x124]
push eax
call fcn.0041165b
pop ecx
mov eax, dword [esi]
xor ecx, ecx
neg eax
xor edi, edi
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x128], ecx
jle 0x4145a5
mov edx, esi
sub edx, eax
mov ebx, edx
mov edx, dword [ebp - 0x128]
cmp ecx, 4
jb 0x414551
cmp ecx, 8
jb 0x41459a
cmp ecx, 0x90
jb 0x414561
cmp ecx, 0x94
jb 0x41459a
lea edx, [eax + ecx]
test edx, edx
js 0x41468f
cmp dword [ebp - 0x138], 0
je 0x414594
mov eax, dword [esi + 0x8c]
shl eax, 6
cmp edx, eax
jge 0x41458e
mov eax, dword [esi + 0x90]
movzx eax, byte [edx + eax]
add edi, eax
mov eax, dword [ebp - 0x130]
mov edx, dword [ebp - 0x128]
inc ecx
cmp ecx, edx
jl 0x414547
mov ebx, dword [ebp - 0x134]
add edi, dword [ebp - 0x128]
and dword [esi + 0xc], 0
and dword [esi + 0x10], 0
and dword [esi + 0x20], 0
cmp dword [ebp - 0x138], 0
jne 0x4145df
and dword [esi + 0x8c], 0
mov eax, dword [esi + 0x90]
test eax, eax
je 0x4145d8
push eax
call fcn.004701df
pop ecx
and dword [esi + 0x90], 0
mov dword [esi], 0x300c
cmp edi, dword [esi + 4]
je 0x4146d4
and dword [esi + 0x8c], 0
cmp dword [0x4d7380], 0
mov eax, dword [esi + 0x90]
jne 0x414698
test eax, eax
je 0x414613
push eax
call fcn.004701df
pop ecx
and dword [esi + 0x90], 0
xor edi, edi
cmp dword [ebp - 0x13c], edi
je 0x414640
cmp dword [ebp + 0x10], edi
jne 0x414640
push edi
push 0x40
call fcn.0042ce0c
pop ecx
pop ecx
test eax, eax
je 0x414640
push 0x40
inc edi
call fcn.00432bc5
pop ecx
push 0x368
push str.C:UsersOfficeDocumentsVisual_StudioPAULAGetSalesSa7.c
push 0x40
call fcn.0042e500
add esp, 0xc
test edi, edi
je 0x41466c
push 0x36a
push str.C:UsersOfficeDocumentsVisual_StudioPAULAGetSalesSa7.c
push 0x40
call fcn.0042cf9f
add esp, 0xc
push dword [ebp + 0x10]
mov dword [0x4d7380], 1
push ebx
push esi
call fcn.004140d9
add esp, 0xc
and dword [0x4d7380], 0
jmp 0x414736
movzx eax, byte [ebx + edx]
jmp 0x41458c
test eax, eax
je 0x4146a3
push eax
call fcn.004701df
pop ecx
mov al, byte [0x4d7384]
and dword [esi + 0x90], 0
lea ecx, [eax + 1]
mov byte [0x4d7384], cl
cmp al, 0xa
jae 0x414734
push edi
push dword [esi + 4]
movzx eax, cl
push ebx
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.0040d511
add esp, 0x14
jmp 0x414734
mov esi, dword [esi + 0x90]
test esi, esi
je 0x41470b
mov eax, dword [0x4d7390]
test eax, eax
jne 0x414702
call fcn.00443594
mov dword [0x4d7390], eax
test eax, eax
jne 0x414702
push esi
push str.:6:RegisterIndividualEmpData__p__FAILED:_CreatePtrList___FAILED.
call fcn.0040d511
jmp 0x414709
push esi
push eax
call fcn.00443a46
pop ecx
pop ecx
xor eax, eax
inc eax
jmp 0x414736
push edi
call fcn.00413646
push 0
lea eax, [ebp - 0x124]
push 0
push eax
call fcn.00411717
push eax
push str.:7:LoadSales___FAILED_to_read_the_size_of_the_sales_file.__GetFileSize_____ld.
call fcn.0040d511
add esp, 0x18
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004654a8
leave
ret