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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x40], ecx
push ecx
lea ecx, [ebp - 0x60]
call fcn.00437de1
mov esi, dword [ebp + 8]
xor edi, edi
mov di, word [esi]
mov eax, edi
call fcn.0040bc38
xor ebx, ebx
test al, al
jne 0x45cf44
push 4
push esi
push 0x49cfb4
call fcn.00431867
add esp, 0xc
test al, al
jne 0x45cdf4
push 5
push esi
push 0x49cfa0
call fcn.00431867
add esp, 0xc
test al, al
jne 0x45cea4
push 8
push esi
push 0x49cfa8
call fcn.00431867
add esp, 0xc
test al, al
je 0x45ce90
mov dword [ebp - 0xc], 0x4b0
lea eax, [ebp + 8]
push eax
call fcn.0040459d
push 4
lea eax, [ebp + 8]
push eax
push 0x49cf64
call fcn.00437ad0
neg al
sbb al, al
push 4
and eax, 2
mov byte [ebp - 0x28], al
lea eax, [ebp + 8]
push eax
push 0x49cfc4
call fcn.00437ad0
add esp, 0x1c
mov esi, 0x4949a4
push esi
lea ecx, [ebp - 0x3c]
mov byte [ebp - 3], al
call fcn.004403c3
push 0x49cfbc
lea ecx, [ebp - 0x38]
call fcn.004403c3
push 1
push 0x2c
pop edi
push edi
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x18], ebx
call fcn.0044212f
push ebx
lea ecx, [ebp - 0x3c]
push ecx
push eax
call fcn.004386e6
push dword [ebp - 0x3c]
call fcn.0040eec0
add esp, 0x10
cmp word [eax], bx
mov dword [ebp - 0x20], eax
jne 0x45cf84
mov ebx, 0x80070057
jmp 0x45d2f0
push 9
push esi
push 0x49cf94
call fcn.00431867
add esp, 0xc
test al, al
je 0x45ceb0
mov dword [ebp - 0xc], 0x4b1
jmp 0x45cdfb
push 5
push esi
push 0x49cf74
call fcn.00431867
add esp, 0xc
test al, al
je 0x45ced0
mov dword [ebp - 0xc], 0xfde9
jmp 0x45cdfb
push 5
push esi
push 0x49cf6c
call fcn.00431867
add esp, 0xc
test al, al
je 0x45cef0
mov dword [ebp - 0xc], 0xfde8
jmp 0x45cdfb
push 4
push esi
push 0x49cf84
call fcn.00431867
add esp, 0xc
test al, al
je 0x45cf10
mov dword [ebp - 0xc], 0x3a8
jmp 0x45cdfb
push 5
push esi
push 0x49cf7c
call fcn.00431867
add esp, 0xc
test al, al
je 0x45cf30
mov dword [ebp - 0xc], 0x3b6
jmp 0x45cdfb
push 5
push esi
push 0x49cf8c
call fcn.00431867
add esp, 0xc
test al, al
je 0x45cf4c
mov dword [ebp - 0xc], ebx
jmp 0x45cdfb
cmp di, 0x2d
jne 0x45cf7c
xor eax, eax
lea ecx, [esi + 2]
mov ax, word [ecx]
push eax
call fcn.004103b8
add esp, 4
test al, al
je 0x45cf7c
push ecx
mov dword [ebp + 8], ecx
call fcn.00436854
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
jge 0x45cdfb
xor ebx, ebx
inc ebx
jmp 0x45d300
mov eax, dword [ebp + 8]
cmp word [eax], di
jne 0x45cfcb
inc eax
inc eax
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
call fcn.00430961
mov eax, dword [ebp + 8]
cmp word [eax], di
pop ecx
je 0x45cfc8
push 1
push edi
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x60]
call fcn.0044212f
push ebx
lea ecx, [ebp - 0x38]
push ecx
push eax
call fcn.004386e6
mov eax, dword [ebp + 8]
add esp, 0xc
cmp word [eax], di
jne 0x45cfcb
lea esi, [eax + 2]
mov eax, dword [ebp - 0x38]
cmp word [eax], 0x24
mov dword [ebp + 8], eax
mov byte [ebp - 2], bl
mov byte [ebp - 1], bl
jne 0x45cfe8
mov cl, byte [eax]
add eax, 2
mov byte [ebp - 2], cl
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
call fcn.00430961
mov eax, dword [ebp + 8]
pop ecx
mov cx, word [eax]
cmp cx, 0x2b
je 0x45d004
cmp cx, 0x2d
jne 0x45d00e
mov cl, byte [eax]
inc eax
inc eax
mov byte [ebp - 1], cl
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
call fcn.00430961
mov eax, dword [ebp + 8]
movzx eax, word [eax]
push eax
call fcn.004103b8
add esp, 8
test al, al
je 0x45d044
push edi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00438933
add esp, 0xc
cmp dword [ebp - 0x18], ebx
jl 0x45d2f0
lea ecx, [ebp - 0x10]
call fcn.00435d62
cmp byte [ebp - 2], bl
je 0x45d063
mov ecx, dword [ebp - 0x40]
push 1
push ebx
lea eax, [ebp - 0x10]
push eax
push esi
call fcn.0043e7f3
jmp 0x45d06c
push esi
lea ecx, [ebp - 0x10]
call fcn.0044042b
push dword [ebp - 0x20]
xor esi, esi
push 0x4950b8
mov dword [ebp - 8], esi
mov dword [ebp - 0x30], ebx
mov byte [ebp + 0xb], bl
call fcn.004318e1
test al, al
pop ecx
pop ecx
je 0x45d095
mov eax, dword [0x4ab2e8]
mov byte [ebp + 0xb], 2
jmp 0x45d0b1
push dword [ebp - 0x20]
push 0x495888
call fcn.004318e1
test al, al
pop ecx
pop ecx
je 0x45d0b4
mov eax, dword [0x4ab2e4]
mov byte [ebp + 0xb], 1
mov dword [ebp - 0x30], eax
cmp byte [ebp - 3], bl
jne 0x45d0c6
push 0x494d34
lea ecx, [ebp - 0x10]
call fcn.00435dd0
cmp byte [ebp + 0xb], bl
mov dword [ebp - 0x14], ebx
jne 0x45d234
push dword [ebp - 0x20]
push 0x497910
call fcn.004318e1
test al, al
pop ecx
pop ecx
je 0x45d0f0
push 0x100
call fcn.004345bc
pop ecx
push ebx
push 0x80
push 3
push ebx
push 7
mov edi, 0xc0000000
push edi
push dword [ebp - 0x20]
lea ecx, [ebp - 8]
call fcn.004045f9
mov esi, dword [ebp - 8]
cmp esi, ebx
jne 0x45d13a
push ebx
push ebx
push dword [ebp - 0x20]
call fcn.0043c9c5
add esp, 0xc
push ebx
push 0x80
push 4
push ebx
push 7
push edi
push dword [ebp - 0x20]
lea ecx, [ebp - 8]
call fcn.004045f9
mov esi, dword [ebp - 8]
cmp esi, ebx
mov dword [ebp - 0x30], esi
jne 0x45d14e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebx, eax
jmp 0x45d2e0
xor eax, eax
push ebx
mov byte [ebp - 0x50], bl
mov byte [ebp - 0x4f], bl
mov byte [ebp - 0x4e], bl
lea edi, [ebp - 0x4d]
stosw word es:[edi], ax
lea eax, [ebp - 0x40]
push eax
push 3
lea eax, [ebp - 0x50]
push eax
push esi
mov dword [ebp - 0x40], ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp byte [ebp - 0x50], 0xff
push 2
pop edi
jne 0x45d18c
cmp byte [ebp - 0x4f], 0xfe
jne 0x45d1c2
mov dword [ebp - 0xc], 0x4b0
mov dword [ebp - 0x14], edi
cmp byte [ebp - 0x50], 0xfe
jne 0x45d1a2
cmp byte [ebp - 0x4f], 0xff
jne 0x45d1c2
mov dword [ebp - 0xc], 0x4b1
mov dword [ebp - 0x14], edi
cmp byte [ebp - 0x50], 0xef
jne 0x45d1c2
cmp byte [ebp - 0x4f], 0xbb
jne 0x45d1c2
cmp byte [ebp - 0x4e], 0xbf
jne 0x45d1c2
mov dword [ebp - 0xc], 0xfde9
mov dword [ebp - 0x14], 3
cmp dword [ebp - 0x40], ebx
push ebx
jne 0x45d225
push ebx
push ebx
push esi
call fcn.0043181b
add esp, 0x10
cmp dword [ebp - 0xc], 0x4b0
jne 0x45d1e9
push ebx
lea eax, [ebp - 0x54]
push eax
push edi
push 0x4995a0
jmp 0x45d1fd
cmp dword [ebp - 0xc], 0x4b1
jne 0x45d209
push ebx
lea eax, [ebp - 0x54]
push eax
push edi
push 0x4995a4
mov dword [ebp - 0x14], edi
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
jmp 0x45d234
cmp dword [ebp - 0xc], 0xfde9
jne 0x45d234
push 3
pop eax
push ebx
lea ecx, [ebp - 0x54]
push ecx
push eax
mov dword [ebp - 0x14], eax
push 0x4995a8
jmp 0x45d200
mov eax, dword [ebp - 0x14]
cdq
push edx
push eax
push esi
call fcn.0043181b
add esp, 0x10
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, dword [ebp - 0xc]
shl eax, 1
cmp edi, 0x4b0
mov dword [ebp - 0x20], eax
je 0x45d2a3
cmp edi, 0x4b1
jne 0x45d262
push eax
push dword [ebp - 0x10]
call fcn.0043459b
pop ecx
pop ecx
jmp 0x45d2a3
cmp edi, 0xfde9
jne 0x45d277
lea ecx, [ebp - 0x10]
call fcn.0040c02e
mov dword [ebp - 0x20], eax
jmp 0x45d2a3
mov eax, dword [ebp - 0x10]
movzx ecx, di
push ecx
push 0xffffffffffffffff
push eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ebx
call fcn.00435cea
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x20], eax
call fcn.0043092f
cmp byte [ebp + 0xb], bl
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
je 0x45d30f
mov edi, dword [ebp - 0x30]
cmp edi, 0xffffffff
jne 0x45d2bb
xor ebx, ebx
inc ebx
jmp 0x45d2e0
push ebx
lea ecx, [ebp + 8]
push ecx
push dword [ebp - 0x20]
mov dword [ebp + 8], ebx
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov esi, dword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
push edi
call esi
push edi
call esi
push edi
call esi
push edi
call esi
lea ecx, [ebp - 8]
call fcn.00402b27
lea ecx, [ebp - 0x10]
call fcn.0043092f
lea ecx, [ebp - 0x38]
call fcn.0043092f
lea ecx, [ebp - 0x3c]
call fcn.0043092f
lea ecx, [ebp - 0x60]
call fcn.0043092f
mov eax, ebx
jmp 0x45d678
lea ecx, [ebp - 0x54]
call fcn.00435d62
lea ecx, [ebp - 0x50]
call fcn.00435d62
lea ecx, [ebp - 0x48]
call fcn.00435c39
lea ecx, [ebp + 8]
call fcn.00435c39
cmp dword [ebp - 0x18], ebx
jne 0x45d3df
cmp byte [ebp - 1], 0x2b
je 0x45d3d0
mov eax, dword [ebp - 0x14]
cdq
push ebx
push edx
push eax
push esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
call fcn.0043181b
push 1
push ebx
push ebx
push esi
call fcn.0043181b
push dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
push edi
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x30], edx
call fcn.0043c6be
add esp, 0x30
jmp 0x45d3ab
mov eax, dword [ebp - 0x34]
push 1
push ebx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
push ebx
push esi
mov dword [ebp - 0x40], eax
call fcn.0043181b
push dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
push edi
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x30], edx
call fcn.0043c6be
add esp, 0x20
test eax, eax
jne 0x45d37b
push ebx
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push esi
call fcn.0043181b
push dword [ebp - 0x40]
lea eax, [ebp - 8]
push dword [ebp - 0x44]
push eax
call fcn.0043ca10
add esp, 0x1c
jmp 0x45d40d
push 2
push ebx
push ebx
push esi
call fcn.0043181b
add esp, 0x10
jmp 0x45d40d
xor eax, eax
inc eax
cmp dword [ebp - 0x18], eax
mov dword [ebp - 0x30], eax
jle 0x45d40d
push dword [ebp - 0x28]
lea eax, [ebp + 8]
push edi
push eax
lea eax, [ebp - 8]
push eax
call fcn.0043c6be
add esp, 0x10
test eax, eax
je 0x45d40d
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x18]
jl 0x45d3ea
cmp byte [ebp - 1], 0x2b
jne 0x45d4bc
cmp dword [ebp - 0x18], ebx
jne 0x45d42f
push dword [ebp - 0x20]
lea ecx, [ebp - 8]
push dword [ebp - 0xc]
call fcn.00430892
jmp 0x45d62e
push 1
push ebx
push ebx
push esi
call fcn.0043181b
push esi
mov edi, eax
call fcn.00474fa7
add esp, 0x14
sub eax, edi
mov dword [ebp - 0x30], eax
jns 0x45d44e
mov dword [ebp - 0x30], ebx
add eax, 0xca
push eax
lea ecx, [ebp - 0x28]
call fcn.00435c56
mov eax, edi
cdq
push ebx
push edx
mov edi, eax
push edi
push esi
mov dword [ebp - 0x18], edx
call fcn.0043181b
add esp, 0x10
push ebx
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x30]
mov dword [ebp - 0x40], ebx
push dword [ebp - 0x28]
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push ebx
push dword [ebp - 0x18]
push edi
push esi
call fcn.0043181b
add esp, 0x10
push dword [ebp - 0x20]
lea ecx, [ebp - 8]
push dword [ebp - 0xc]
call fcn.00430892
cmp dword [ebp - 0x30], ebx
jle 0x45d4b4
push dword [ebp - 0x30]
lea ecx, [ebp - 8]
push dword [ebp - 0x28]
call fcn.00430892
lea ecx, [ebp - 0x28]
jmp 0x45d629
cmp byte [ebp - 1], 0x2d
jne 0x45d56b
cmp dword [ebp - 0x18], ebx
je 0x45d62e
push 1
push ebx
push ebx
push esi
call fcn.0043181b
push dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
push edi
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x20], edx
call fcn.0043c6be
push 1
push ebx
push ebx
push esi
call fcn.0043181b
push esi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
call fcn.00474fa7
mov edi, eax
sub edi, dword [ebp - 0x34]
add esp, 0x34
lea eax, [edi + 0xca]
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x28], edx
call fcn.00435c56
push ebx
lea eax, [ebp - 0x40]
push eax
add edi, 0xc8
push edi
push dword [ebp - 0x30]
mov dword [ebp - 0x40], ebx
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push ebx
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push esi
call fcn.0043181b
push dword [ebp - 0x20]
lea eax, [ebp - 8]
push dword [ebp - 0x24]
push eax
call fcn.0043ca10
add esp, 0x1c
push dword [ebp - 0x40]
lea ecx, [ebp - 8]
push dword [ebp - 0x30]
call fcn.00430892
jmp 0x45d626
cmp dword [ebp - 0x18], ebx
je 0x45d41c
push 1
push ebx
push ebx
push esi
call fcn.0043181b
push dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
push edi
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x18], edx
call fcn.0043c6be
push 1
push ebx
push ebx
push esi
call fcn.0043181b
push esi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
call fcn.00474fa7
mov edi, eax
sub edi, dword [ebp - 0x2c]
add esp, 0x34
lea eax, [edi + 0xca]
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], edx
call fcn.00435c56
push ebx
lea eax, [ebp - 0x40]
push eax
add edi, 0xc8
push edi
push dword [ebp - 0x30]
mov dword [ebp - 0x40], ebx
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push ebx
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push esi
call fcn.0043181b
add esp, 0x10
push dword [ebp - 0x20]
lea ecx, [ebp - 8]
push dword [ebp - 0xc]
call fcn.00430892
push dword [ebp - 0x40]
lea ecx, [ebp - 8]
push dword [ebp - 0x30]
call fcn.00430892
push 1
push ebx
push ebx
push esi
call fcn.0043181b
mov dword [ebp - 0x28], edx
cdq
push edx
push eax
lea eax, [ebp - 8]
push eax
call fcn.0043ca10
add esp, 0x1c
lea ecx, [ebp - 0x30]
call fcn.0043092f
lea ecx, [ebp + 8]
call fcn.0043092f
lea ecx, [ebp - 0x48]
call fcn.0043092f
lea ecx, [ebp - 0x50]
call fcn.0043092f
lea ecx, [ebp - 0x54]
call fcn.0043092f
lea ecx, [ebp - 8]
call fcn.00402b27
lea ecx, [ebp - 0x10]
call fcn.0043092f
lea ecx, [ebp - 0x38]
call fcn.0043092f
lea ecx, [ebp - 0x3c]
call fcn.0043092f
lea ecx, [ebp - 0x60]
call fcn.0043092f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8