Function at 0x4dce1d
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x59a240]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
lea eax, [ebp - 0x108]
push 0x104
push ebx
push eax
mov dword [ebp - 0x274], ebx
mov dword [ebp - 0x26c], ebx
call fcn.004e4da0
push 0x14c
lea eax, [ebp - 0x264]
push ebx
push eax
call fcn.004e4da0
xor eax, eax
lea edi, [ebp - 0x118]
stosd dword es:[edi], eax
push str.FTPCRF.fat
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x108]
push eax
call fcn.0046379e
push 0x1a1a
mov edi, str.E:UserskerryDocumentsVisual_Studio_2022ProjectsPAULA__TEMP_COPY_UpdatePAULA.c
lea eax, [ebp - 0x118]
push edi
push eax
call fcn.004c9210
push 0x1a1c
push edi
push 4
pop esi
push esi
call fcn.004625f2
push 0x1a1f
push edi
push esi
call fcn.00460f18
add esp, 0x44
test eax, eax
jne 0x4dcee1
push esi
call fcn.0046733c
mov dword [esp], 0x1a22
push edi
push esi
call fcn.00460f18
add esp, 0xc
test eax, eax
jne 0x4dcee1
push str.:4:SetLastFTPConnectTime___could_not_logon_to_TAMS:_LockTAMSServer_LTS_FTPRESULTS__FAILED_
call fcn.00425c08
pop ecx
xor esi, esi
mov dword [ebp - 0x268], ebx
inc esi
mov edi, ebx
mov eax, edi
sub eax, ebx
je 0x4dcf1a
sub eax, 1
jne 0x4dd4d8
cmp dword [ebp + 8], 3
je 0x4dd4ad
lea eax, [ebp - 0x108]
push str.FTPCRF.fat
push eax
call fcn.0046379e
pop ecx
pop ecx
jmp 0x4dcf3d
push str.FTPCRF.fat
push ebx
push ebx
call fcn.0047ced0
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x108]
push 0x50d2a0
push eax
call fcn.00404f28
add esp, 0x10
push 0x14c
lea eax, [ebp - 0x264]
push ebx
push eax
call fcn.004e4da0
push ebx
push 0x61a8
push ebx
push SQLGetDiagRec
push 4
push ebx
push 1
lea eax, [ebp - 0x108]
push 7
push eax
call fcn.004286d2
add esp, 0x30
mov dword [ebp - 0x270], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x270]
cmp esi, 0xffffffff
jne 0x4dcfa7
push eax
push str._GetLastError_
lea eax, [ebp - 0x108]
push eax
push str.:5:SetLastFTPConnectTime___FAILED:_CreateFile___s___FAILED:__s_ld
call fcn.00425c08
add esp, 0x10
jmp 0x4dd4ab
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
lea eax, [ebp - 0x274]
push eax
push 0x14c
lea eax, [ebp - 0x264]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4dd030
mov esi, 0x14c
cmp dword [ebp - 0x274], esi
jb 0x4dd030
lea eax, [ebp - 0x264]
push eax
call fcn.004d7697
pop ecx
test eax, eax
je 0x4dd01a
lea eax, [ebp - 0x264]
push eax
call fcn.004d7697
push eax
lea eax, [ebp - 0x108]
push eax
push str.:7:SetLastFTPConnectTime___read_data_from___s__and_it_seems_to_be_corrupt:_IsFtpConnectTimeInvalid___returned__ld
call fcn.00425c08
push esi
lea eax, [ebp - 0x264]
push ebx
push eax
call fcn.004e4da0
add esp, 0x1c
mov esi, dword [ebp + 8]
lea eax, [esi - 1]
cmp eax, 8
ja case.default.0x4dd029
jmp dword [eax*4 + 0x4dd4e9]
mov esi, dword [ebp + 8]
cmp esi, 9
je 0x4dd01d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4dd067
push eax
push str._GetLastError_
push 0x14c
push dword [ebp - 0x274]
lea eax, [ebp - 0x108]
push eax
push str.:9:SetLastFTPConnectTime___encountered_a_problem:_ReadFile___s___FAILED__dwBytesRead___ld_of__ld:__s_ld
call fcn.004255b9
add esp, 0x18
push 0x14c
lea eax, [ebp - 0x264]
push ebx
push eax
call fcn.004e4da0
add esp, 0xc
jmp 0x4dd01d
mov dword [ebp - 0x264], 1
lea esi, [ebp - 0x118]
lea edi, [ebp - 0x260]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x174]
push 0x18
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
inc dword [ebp - 0x240]
mov dword [ebp - 0x23c], ebx
call fcn.004604d7
mov eax, dword [0x6a11dc]
lea esi, [ebp - 0x118]
mov dword [ebp - 0x238], 1
lea edi, [ebp - 0x234]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
inc dword [ebp - 0x214]
test eax, eax
mov ecx, dword [ebp - 0x158]
cmovne ecx, eax
mov dword [ebp - 0x210], ebx
mov eax, dword [0x6a11e0]
test eax, eax
mov dword [ebp - 0x158], ecx
mov ecx, dword [ebp - 0x154]
cmovne ecx, eax
mov dword [ebp - 0x1bc], ebx
lea eax, [ebp - 0x150]
mov dword [ebp - 0x1dc], ebx
push eax
mov dword [ebp - 0x154], ecx
call fcn.004d7294
push ecx
mov esi, 0x6a120c
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004c9694
add esp, 0x10
test eax, eax
jne 0x4dd143
mov esi, 0x6a120c
lea edi, [ebp - 0x12a]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x268]
call fcn.0046039d
push eax
call fcn.004608c3
pop ecx
push ebx
push ebx
push ebx
push dword [ebp - 0x270]
mov dword [ebp - 0x18c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4dd198
mov eax, dword [0x6a1380]
inc eax
mov dword [0x6a1380], eax
cmp eax, 0xa
jae 0x4dd198
push str._GetLastError_
lea eax, [ebp - 0x108]
push eax
push str.SetLastFTPConnectTime___FAILED:_SetFilePointer___s___FAILED:__s
call fcn.004255b9
add esp, 0xc
push ebx
lea eax, [ebp - 0x26c]
push eax
push 0x14c
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x270]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
mov dword [ebp - 0x27c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1ad1
push str.E:UserskerryDocumentsVisual_Studio_2022ProjectsPAULA__TEMP_COPY_UpdatePAULA.c
push str.SetLastFTPConnectTime
push dword [ebp - 0x270]
mov dword [ebp - 0x278], eax
call fcn.00426fac
test esi, esi
je 0x4dd475
cmp dword [ebp - 0x26c], 0x14c
jb 0x4dd475
cmp dword [ebp - 0x278], ebx
je 0x4dd4ad
push dword [ebp - 0x210]
lea esi, [ebp - 0x224]
push dword [ebp - 0x214]
push 1
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004c9acc
add esp, 0x14
lea esi, [ebp - 0x234]
push eax
push 1
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004c9acc
add esp, 0x14
lea esi, [ebp - 0x250]
push eax
push dword [ebp - 0x238]
push dword [ebp - 0x23c]
push dword [ebp - 0x240]
push 1
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004c9acc
add esp, 0x14
lea esi, [ebp - 0x260]
push eax
push 1
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004c9acc
add esp, 0x14
push eax
push dword [ebp - 0x264]
push dword [ebp + 8]
push str.:2:SetLastFTPConnectTime___LOG:_Action_d:_Global:_bGS___d__GLST___s__GLFT___s__GLNCS___d__GLNCF___d____Local:_bLS___d__LLST___s__LLFT___s__LLNCS___d__LLNCF___d
call fcn.00425c08
add esp, 0x30
lea eax, [ebp - 0x108]
mov edi, 0x2710
push eax
push dword [ebp - 0x278]
push ebx
push edi
push eax
call fcn.0042aa40
add esp, 0xc
push eax
push str.:2:FYI:_filesize___d__dwLastError___d:__s
call fcn.00425c08
push 0x1ae4
push str.E:UserskerryDocumentsVisual_Studio_2022ProjectsPAULA__TEMP_COPY_UpdatePAULA.c
lea eax, [ebp - 0x108]
push 0x509c18
push eax
call fcn.0042d2de
mov esi, eax
add esp, 0x20
test esi, esi
je 0x4dd454
push esi
push 0x14c
lea eax, [ebp - 0x264]
push 1
push eax
call fcn.004e9927
push esi
mov dword [ebp - 0x26c], eax
call fcn.0042d153
push ebx
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.0042aa40
push eax
push dword [ebp - 0x26c]
push str.:2:FYI:_dwBytesWritten___d__filesize___d
call fcn.00425c08
add esp, 0x2c
jmp 0x4dd467
mov dword [ebp - 0x1bc], 1
lea edi, [ebp - 0x1b8]
push 0x18
lea eax, [ebp - 0x1a8]
lea esi, [ebp - 0x118]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004604d7
pop ecx
pop ecx
jmp 0x4dd143
lea esi, [ebp - 0x118]
lea edi, [ebp - 0x20c]
jmp 0x4dd13f
mov dword [ebp - 0x264], ebx
lea esi, [ebp - 0x118]
lea edi, [ebp - 0x250]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
inc dword [ebp - 0x23c]
lea esi, [ebp - 0x118]
mov dword [ebp - 0x240], ebx
lea edi, [ebp - 0x224]
mov dword [ebp - 0x238], ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
inc dword [ebp - 0x210]
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x1bc], ebx
mov dword [ebp - 0x1dc], ebx
jmp 0x4dd143
lea esi, [ebp - 0x118]
lea edi, [ebp - 0x188]
movsd dword es:[edi], dword [esi]
push ebx
push ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0046045f
push eax
call fcn.004608c3
add esp, 0xc
mov dword [ebp - 0x178], eax
jmp 0x4dd143
mov dword [ebp - 0x1dc], 1
lea edi, [ebp - 0x1fc]
push 0x19
lea eax, [ebp - 0x1d8]
jmp 0x4dd355
mov dword [ebp - 0x1dc], ebx
jmp 0x4dd407
mov dword [ebp - 0x1dc], ebx
lea esi, [ebp - 0x118]
lea edi, [ebp - 0x1fc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x1ec]
jmp 0x4dd40d
push dword [ebp + 8]
push str.SetLastFTPConnectTime___FAILED:_iActionCode_was_set_to_an_invalid_value__ld
call fcn.004255b9
pop ecx
pop ecx
jmp case.0x4dd029.9
lea eax, [ebp - 0x108]
push eax
push str.:2:FYI:_FAILED_TO_OPEN:__s
call fcn.00425c08
pop ecx
pop ecx
mov esi, dword [ebp - 0x27c]
mov edi, dword [ebp - 0x268]
jmp 0x4dd4ad
mov eax, dword [0x6a1380]
mov ecx, eax
inc eax
mov dword [0x6a1380], eax
cmp ecx, 5
jae 0x4dd4ab
push str._GetLastError_
push dword [ebp - 0x26c]
lea eax, [ebp - 0x108]
push 0x14c
push eax
push str.:7:SetLastFTPConnectTime___FAILED:_WriteFile___s____ld_____ld_FAILED:__s
call fcn.004255b9
add esp, 0x14
mov esi, ebx
inc edi
mov dword [ebp - 0x268], edi
cmp edi, 2
jl 0x4dceec
mov ebx, esi
push 4
call fcn.0046733c
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3632
leave
ret
push edi
push str.:9:SetLastFTPConnectTime___CRITICAL_ERROR:_An_impossible_phase_has_been_run____Phase__ld__
call fcn.004255b9
pop ecx
pop ecx
jmp 0x4dd4bf