Function at 0x456dea
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4264
call fcn.0045b2d0
push ebx
push esi
mov dword [ebp - 0x4260], ecx
cmp dword [ebp + 0x14], 3
je 0x456e1b
cmp dword [ebp + 0x14], 2
je 0x456e1b
cmp dword [ebp + 0x14], 1
je 0x456e1b
mov eax, 0x10000
jmp 0x4572f8
cmp dword [ebp + 0x14], 3
jne 0x456f46
mov eax, dword [ebp - 0x4260]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x456edc
mov edx, dword [ebp - 0x4260]
cmp dword [edx + 4], 0xffffffff
je 0x456e54
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
push ecx
call fcn.004562ee
add esp, 4
mov edx, dword [ebp - 0x4260]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x456e7b
mov eax, 0x10000
jmp 0x4572f8
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x456e9c
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
push ecx
call fcn.0045582a
add esp, 4
mov edx, dword [ebp - 0x4260]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x456ebf
mov edx, dword [ebp - 0x4260]
mov eax, dword [edx]
push eax
call fcn.00455898
add esp, 4
jmp 0x456e9c
mov ecx, dword [ebp - 0x4260]
mov edx, dword [ecx]
push edx
call fcn.00455cf7
add esp, 4
mov eax, dword [ebp - 0x4260]
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x4260]
mov edx, dword [ecx]
push edx
call fcn.00455eb9
add esp, 0xc
mov dword [ebp - 0x4140], eax
cmp dword [ebp - 0x4140], 0
jle 0x456f0e
mov eax, 0x600
jmp 0x4572f8
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
push ecx
call fcn.004562ee
add esp, 4
mov edx, dword [ebp - 0x4260]
mov dword [edx + 4], 0xffffffff
cmp dword [ebp - 0x4140], 0
jne 0x456f3c
xor eax, eax
jmp 0x4572f8
mov eax, 0x5000000
jmp 0x4572f8
mov eax, dword [ebp - 0x4260]
cmp dword [eax + 4], 0xffffffff
je 0x456f63
mov ecx, dword [ebp - 0x4260]
mov edx, dword [ecx]
push edx
call fcn.004562ee
add esp, 4
mov eax, dword [ebp - 0x4260]
mov dword [eax + 4], 0xffffffff
mov ecx, dword [ebp - 0x4260]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 4]
jl 0x456f8a
mov eax, 0x10000
jmp 0x4572f8
mov ecx, dword [ebp - 0x4260]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0x10]
jge 0x456fab
mov ecx, dword [ebp - 0x4260]
mov edx, dword [ecx]
push edx
call fcn.0045582a
add esp, 4
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
cmp edx, dword [ebp + 8]
jge 0x456fce
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
push ecx
call fcn.00455898
add esp, 4
jmp 0x456fab
lea edx, [ebp - 0x412c]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x4260]
call fcn.00456596
mov ecx, dword [ebp - 0x4024]
and ecx, 0x10
test ecx, ecx
je 0x457020
cmp dword [ebp + 0x14], 1
jne 0x456ffe
xor eax, eax
jmp 0x4572f8
lea edx, [ebp - 0x4128]
push edx
mov eax, dword [ebp - 0x4260]
add eax, 0x138
push eax
call fcn.00456ce6
add esp, 8
xor eax, eax
jmp 0x4572f8
cmp dword [ebp + 0x14], 1
jne 0x457034
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4134], ecx
jmp 0x4571a6
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x4148], edx
mov eax, dword [ebp - 0x4148]
mov dword [ebp - 0x4144], eax
mov ecx, dword [ebp - 0x4144]
movsx edx, byte [ecx]
test edx, edx
je 0x457092
mov eax, dword [ebp - 0x4144]
movsx ecx, byte [eax]
cmp ecx, 0x2f
je 0x457072
mov edx, dword [ebp - 0x4144]
movsx eax, byte [edx]
cmp eax, 0x5c
jne 0x457081
mov ecx, dword [ebp - 0x4144]
add ecx, 1
mov dword [ebp - 0x4148], ecx
mov edx, dword [ebp - 0x4144]
add edx, 1
mov dword [ebp - 0x4144], edx
jmp 0x457049
mov eax, dword [ebp - 0x4148]
cmp eax, dword [ebp + 0xc]
je 0x457182
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x4250]
push edx
call sub.MSVCRT.dll_strcpy
add esp, 8
mov eax, dword [ebp - 0x4148]
sub eax, dword [ebp + 0xc]
mov byte [ebp + eax - 0x4251], 0
movsx ecx, byte [ebp - 0x4250]
cmp ecx, 0x2f
je 0x4570f5
movsx edx, byte [ebp - 0x4250]
cmp edx, 0x5c
je 0x4570f5
movsx eax, byte [ebp - 0x424f]
cmp eax, 0x3a
je 0x4570f5
mov dword [ebp - 0x4264], 0
jmp 0x4570ff
mov dword [ebp - 0x4264], 1
mov cl, byte [ebp - 0x4264]
mov byte [ebp - 0x414c], cl
mov ebx, dword [ebp - 0x414c]
and ebx, 0xff
push 0x474de8
lea edx, [ebp - 0x4250]
push edx
call fcn.00457b00
add esp, 8
mov esi, eax
neg esi
sbb esi, esi
neg esi
push 0x474dec
lea eax, [ebp - 0x4250]
push eax
call fcn.00457b00
add esp, 8
neg eax
sbb eax, eax
neg eax
or esi, eax
or ebx, esi
mov byte [ebp - 0x414c], bl
mov ecx, dword [ebp - 0x414c]
and ecx, 0xff
test ecx, ecx
jne 0x457182
lea edx, [ebp - 0x4250]
push edx
mov eax, dword [ebp - 0x4260]
add eax, 0x138
push eax
call fcn.00456ce6
add esp, 8
push 0
mov ecx, dword [ebp - 0x4024]
push ecx
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x4134], eax
cmp dword [ebp - 0x4134], 0xffffffff
jne 0x4571b9
mov eax, 0x200
jmp 0x4572f8
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
push ecx
call fcn.00455cf7
add esp, 4
mov byte [ebp - 0x4138], 0
push 0x4000
lea edx, [ebp - 0x4000]
push edx
mov eax, dword [ebp - 0x4260]
mov ecx, dword [eax]
push ecx
call fcn.00455eb9
add esp, 0xc
mov dword [ebp - 0x4254], eax
cmp dword [ebp - 0x4254], 0
jge 0x457206
mov byte [ebp - 0x4138], 1
jmp 0x45724f
cmp dword [ebp - 0x4254], 0
jne 0x457211
jmp 0x45724f
push 0
lea edx, [ebp - 0x4258]
push edx
mov eax, dword [ebp - 0x4254]
push eax
lea ecx, [ebp - 0x4000]
push ecx
mov edx, dword [ebp - 0x4134]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x425c], eax
cmp dword [ebp - 0x425c], 0
jne 0x45724d
mov byte [ebp - 0x4138], 1
jmp 0x45724f
jmp 0x4571d1
mov byte [ebp - 0x413c], 0
mov eax, dword [ebp - 0x4134]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x4130], eax
cmp dword [ebp - 0x4130], 1
jne 0x457289
mov ecx, dword [ebp - 0x4138]
and ecx, 0xff
test ecx, ecx
jne 0x457289
mov byte [ebp - 0x413c], 1
mov edx, dword [ebp - 0x413c]
and edx, 0xff
test edx, edx
je 0x4572bb
lea eax, [ebp - 0x4010]
push eax
lea ecx, [ebp - 0x4020]
push ecx
lea edx, [ebp - 0x4018]
push edx
mov eax, dword [ebp - 0x4134]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4572ce
mov ecx, dword [ebp - 0x4134]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x4260]
mov eax, dword [edx]
push eax
call fcn.004562ee
add esp, 4
mov ecx, dword [ebp - 0x4138]
and ecx, 0xff
test ecx, ecx
je 0x4572f6
mov eax, 0x400
jmp 0x4572f8
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10