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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51a6d4
mov eax, dword fs:[0]
push eax
mov eax, 0x10a8
call fcn.004d9200
mov eax, dword [0x577014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1070], edi
mov dword [ebp - 0x1084], edi
mov dword [ebp - 0x1084], edi
xor esi, esi
xor edx, edx
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x1064]
call fcn.00428920
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], esi
je 0x4566dc
push str..dat
push ecx
mov esi, esp
mov dword [ebp - 0x1084], esi
mov ecx, dword [ebp - 0x1064]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x108c]
mov dword [esi], eax
call fcn.0042960a
pop ecx
mov edx, eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1074]
call fcn.00409442
pop ecx
push eax
lea ecx, [ebp - 0x1064]
mov byte [ebp - 4], 5
call fcn.00405d6e
mov ecx, dword [ebp - 0x1074]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x108c]
lea ecx, [ecx - 0x10]
call fcn.00407189
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push 1
push dword [ebp - 0x1064]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x106c], esi
mov byte [ebp - 4], 6
cmp esi, 0xffffffff
je 0x4571c0
test esi, esi
je 0x4571c0
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
je 0x456966
lea ecx, [ebp - 0x1068]
call fcn.0040687a
mov byte [ebp - 4], 8
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
push eax
mov dword [ebp - 0x1074], eax
lea ecx, [eax + eax]
mov dword [ebp - 0x108c], ecx
lea ecx, [ebp - 0x1068]
call fcn.00406e86
push dword [ebp - 0x1074]
lea ecx, [ebp - 0x1068]
mov edi, eax
call fcn.00406ec4
push dword [ebp - 0x108c]
mov edx, esi
lea ecx, [ebp - 0x1098]
push edi
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 9
cmp dword [ebp - 0x1098], 0
jge 0x456845
cmp dword [ebp - 0x1094], 0
mov eax, 0xa61
cmovne eax, dword [ebp - 0x1094]
push eax
push dword [ebp - 0x1098]
push ecx
mov esi, esp
mov dword [ebp - 0x1084], esi
mov edi, dword [ebp - 0x1090]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x1080]
mov dword [esi], eax
call fcn.00406620
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x1080]
push eax
mov byte [ebp - 4], 0xa
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x1068]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x106c]
call fcn.00427477
mov ecx, dword [ebp - 0x1064]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00407189
mov ecx, dword [ebp + 0x10]
add ecx, 0xfffffff0
call fcn.00407189
mov eax, dword [ebp - 0x1070]
jmp 0x457253
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x1090]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1068]
push dword [eax - 0xc]
call fcn.00406ec4
lea edx, [ebp + 8]
lea ecx, [ebp - 0x1068]
call fcn.00405d14
test al, al
jne 0x4568e4
push 0xa65
push 0x80004005
push ecx
mov ecx, esp
push str..dat_file_does_not_match_.exe_file
call fcn.00406fea
mov ecx, dword [ebp - 0x1070]
call fcn.00406620
mov ecx, dword [ebp - 0x1068]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x106c]
call fcn.00427477
mov ecx, dword [ebp - 0x1064]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx - 0x10]
jmp 0x456835
xor eax, eax
push eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x456954
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0xa67
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x1080]
push eax
mov byte [ebp - 4], 0xb
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
jmp 0x45689c
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x1068]
lea ecx, [ecx - 0x10]
call fcn.00407189
xor eax, eax
lea edi, [ebp - 0x1038]
stosd dword es:[edi], eax
lea edx, [ebp - 0x1038]
lea ecx, [ebp - 0x1098]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0045654a
mov byte [ebp - 4], 0xc
cmp dword [ebp - 0x1098], 0
jge 0x4569fe
cmp dword [ebp - 0x1094], 0
mov eax, 0xa6b
cmovne eax, dword [ebp - 0x1094]
push eax
push dword [ebp - 0x1098]
push ecx
mov esi, esp
mov dword [ebp - 0x1084], esi
mov edi, dword [ebp - 0x1090]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x1080]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x1080]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
jmp 0x4568a5
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x1090]
lea ecx, [ecx - 0x10]
call fcn.00407189
xor eax, eax
lea edi, [ebp - 0x1024]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x1098]
push 0x14
mov edx, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x1024]
push eax
call fcn.0042a333
pop ecx
pop ecx
jmp 0x456a8a
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x1090]
lea ecx, [ecx - 0x10]
call fcn.00407189
push 0x14
lea eax, [ebp - 0x1024]
push eax
lea eax, [ebp - 0x1038]
push eax
call fcn.004da4e8
add esp, 0xc
test eax, eax
je 0x456add
xor eax, eax
lea edi, [ebp - 0x1024]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x1098]
push 0x14
mov edx, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x1024]
push eax
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x1098]
test ecx, ecx
jns 0x456a37
cmp dword [ebp - 0x1094], 0
mov eax, 0xa70
cmovne eax, dword [ebp - 0x1094]
push eax
push ecx
push ecx
mov esi, esp
mov dword [ebp - 0x1084], esi
mov edi, dword [ebp - 0x1090]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x1080]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 0xf
jmp 0x4569d6
xor eax, eax
lea edi, [ebp - 0x104c]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x1084]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0040687a
push ecx
mov byte [ebp - 4], 0x10
mov edi, esp
mov dword [ebp - 0x108c], edi
mov eax, dword [ebp - 0x1084]
add eax, 0xfffffff0
mov dword [ebp - 0x1074], esp
mov ecx, eax
mov dword [ebp - 0x1088], eax
call fcn.004070e7
add eax, 0x10
mov dword [edi], eax
push 0
push 0
push ecx
mov byte [ebp - 4], 0x11
mov edi, esp
mov dword [ebp - 0x108c], edi
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov ecx, eax
mov dword [ebp - 0x1068], eax
call fcn.004070e7
add eax, 0x10
lea edx, [ebp - 0x104c]
mov dword [edi], eax
lea ecx, [ebp - 0x10ac]
mov byte [ebp - 4], 0x10
call fcn.0043be72
add esp, 0x10
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0x10ac], 0
jge 0x456c22
cmp dword [ebp - 0x10a8], 0
mov eax, 0xa78
cmovne eax, dword [ebp - 0x10a8]
push eax
push dword [ebp - 0x10ac]
push ecx
mov esi, esp
mov dword [ebp - 0x1074], esi
mov ecx, dword [ebp - 0x10a4]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x1080]
mov dword [esi], eax
call fcn.00406620
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x1080]
push eax
mov byte [ebp - 4], 0x13
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x10a4]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x1088]
call fcn.00407189
lea ecx, [ebp - 0x106c]
call fcn.00427477
mov ecx, dword [ebp - 0x1064]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x1068]
jmp 0x4568d4
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x10a4]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea eax, [ebp - 0x10a8]
mov edx, esi
push 8
push eax
lea ecx, [ebp - 0x1098]
call fcn.0042a333
pop ecx
pop ecx
jmp 0x456d5c
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x1090]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x10a8]
or eax, dword [ebp - 0x10a4]
je 0x4571a3
xor eax, eax
lea edi, [ebp - 0x1060]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x1080]
push 0x14
mov edx, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x1060]
push eax
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 0x16
cmp dword [ebp - 0x1080], 0
jl 0x457141
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea eax, [ebp - 0x1099]
mov edx, esi
push 1
push eax
lea ecx, [ebp - 0x101c]
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 0x18
cmp dword [ebp - 0x101c], 0
jl 0x4570f7
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x1014]
add ecx, 0xfffffff0
call fcn.00407189
cmp byte [ebp - 0x1099], 0
jne 0x4570b9
push 0x14
lea eax, [ebp - 0x104c]
push eax
lea eax, [ebp - 0x1060]
push eax
call fcn.004da4e8
add esp, 0xc
test eax, eax
je 0x456e16
push 1
push 0
push dword [ebp - 0x10a4]
push dword [ebp - 0x10a8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x456dd6
lea eax, [ebp - 0x10a8]
mov edx, esi
push 8
push eax
lea ecx, [ebp - 0x1098]
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 0x14
mov ecx, dword [ebp - 0x1098]
test ecx, ecx
jns 0x456c51
cmp dword [ebp - 0x1094], 0
mov eax, 0xa7c
cmovne eax, dword [ebp - 0x1094]
push eax
push ecx
push ecx
mov esi, esp
mov dword [ebp - 0x1074], esi
mov edi, dword [ebp - 0x1090]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x1080]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 0x15
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x1080]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
jmp 0x456be3
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0xa9d
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov byte [ebp - 4], 0x21
jmp 0x4570da
xor eax, eax
push eax
push eax
push 2
push eax
push eax
push 2
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x10a0], edi
mov byte [ebp - 4], 0x1b
cmp edi, 0xffffffff
je 0x456e42
test edi, edi
jne 0x456f6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0xa88
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov byte [ebp - 4], 0x1c
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x1080]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x10a0]
call fcn.00427477
jmp 0x456be8
test edx, edx
jl 0x456ec8
jg 0x456ebb
cmp ecx, 0x1000
jbe 0x456ec8
mov eax, 0x1000
mov dword [ebp - 0x108c], eax
jmp 0x456ed0
mov eax, ecx
mov dword [ebp - 0x108c], ecx
cdq
sub ecx, eax
mov eax, dword [ebp - 0x10a4]
mov dword [ebp - 0x10a8], ecx
sbb eax, edx
mov dword [ebp - 0x10a4], eax
js 0x457093
jg 0x456ef7
test ecx, ecx
jb 0x457093
mov eax, dword [ebp - 0x108c]
test eax, eax
jle 0x45706d
and dword [ebp - 0x10b0], 0
lea ecx, [ebp - 0x10b0]
push 0
push ecx
push eax
lea eax, [ebp - 0x1010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45702d
cmp dword [ebp - 0x10b0], 0
je 0x456f81
and dword [ebp - 0x1074], 0
lea eax, [ebp - 0x1074]
push 0
push eax
push dword [ebp - 0x10b0]
lea eax, [ebp - 0x1010]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x1074]
cmp eax, dword [ebp - 0x10b0]
jne 0x456fed
mov ecx, dword [ebp - 0x10a8]
mov eax, ecx
mov edx, dword [ebp - 0x10a4]
or eax, edx
jne 0x456ead
mov esi, dword [ebp - 0x1070]
and dword [esi], 0
lea ecx, [esi + 8]
and dword [esi + 4], 0
call fcn.0040687a
lea ecx, [ebp - 0x10a0]
call fcn.00427477
mov ecx, dword [ebp - 0x1088]
call fcn.00407189
lea ecx, [ebp - 0x106c]
call fcn.00427477
mov ecx, dword [ebp - 0x1064]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x1068]
call fcn.00407189
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, esi
jmp 0x457253
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0xa99
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov byte [ebp - 4], 0x20
jmp 0x456e7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0xa93
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov byte [ebp - 4], 0x1f
jmp 0x456e7d
push 0xa90
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov byte [ebp - 4], 0x1e
jmp 0x456e7d
push 0xa8f
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov byte [ebp - 4], 0x1d
jmp 0x456e7d
push 0xa84
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
mov byte [ebp - 4], 0x1a
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x1080]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
jmp 0x456be0
cmp dword [ebp - 0x1018], 0
mov eax, 0xa83
cmovne eax, dword [ebp - 0x1018]
push eax
push dword [ebp - 0x101c]
push ecx
mov esi, esp
mov dword [ebp - 0x1074], esi
mov edi, dword [ebp - 0x1014]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x1080]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 0x19
jmp 0x456dae
cmp dword [ebp - 0x107c], 0
mov eax, 0xa81
cmovne eax, dword [ebp - 0x107c]
push eax
push dword [ebp - 0x1080]
push ecx
mov esi, esp
mov dword [ebp - 0x1074], esi
mov edi, dword [ebp - 0x1078]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x101c]
mov dword [esi], eax
call fcn.00406620
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x101c]
push eax
mov byte [ebp - 4], 0x17
call fcn.0040121b
mov ecx, dword [ebp - 0x1014]
jmp 0x456dc6
mov esi, dword [ebp - 0x1070]
and dword [esi + 4], 0
lea ecx, [esi + 8]
mov dword [esi], 1
call fcn.0040687a
jmp 0x456fa1
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0xa5c
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x1080]
call fcn.00406620
lea eax, [ebp - 0x1080]
mov byte [ebp - 4], 7
push eax
mov ecx, edi
call fcn.0040121b
mov ecx, dword [ebp - 0x1078]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x106c]
call fcn.00427477
mov ecx, dword [ebp - 0x1064]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d818b
leave
ret