Function at 0x40bed0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x445d98
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45accc]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
xor ebp, ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
call fcn.0041aec8
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40bf1d
push 0x80004005
call fcn.00401460
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov ecx, dword [esi + 0x204]
push 0x200
push ebp
push ecx
mov dword [esp + 0x44], ebp
call fcn.00431320
add esp, 0xc
push 0x10
push str.PHISON_ImageFile
lea ecx, [esp + 0x1c]
call fcn.00405100
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [esi + 0x204]
mov edi, dword [esp + 0x14]
mov ecx, dword [edi]
mov dword [eax], ecx
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
mov ecx, dword [edi + 8]
mov dword [eax + 8], ecx
mov edx, dword [edi + 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x204]
mov dword [eax + 0x10], 0x20000
mov ecx, dword [esi + 0x204]
mov byte [ecx + 0x14], 2
mov edx, dword [esi + 0x204]
mov byte [edx + 0x15], 0x10
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x204]
shr eax, 8
cmp byte [esp + 0x44], 0
mov byte [ecx + 0x16], al
movzx eax, byte [esp + 0x20]
mov edx, dword [esi + 0x204]
mov byte [edx + 0x17], al
movzx edx, byte [esp + 0x22]
mov ecx, dword [esi + 0x204]
mov byte [ecx + 0x18], dl
movzx ecx, byte [esp + 0x26]
mov eax, dword [esi + 0x204]
mov byte [eax + 0x19], cl
movzx eax, byte [esp + 0x28]
mov edx, dword [esi + 0x204]
mov byte [edx + 0x1a], al
movzx edx, byte [esp + 0x2a]
mov ecx, dword [esi + 0x204]
mov byte [ecx + 0x1b], dl
movzx ecx, byte [esp + 0x2c]
mov eax, dword [esi + 0x204]
mov byte [eax + 0x1c], cl
je 0x40c019
mov edx, dword [esi + 0x204]
mov byte [edx + 0x1d], 4
jmp 0x40c038
cmp byte [0x45ca34], 0
je 0x40c02e
mov eax, dword [esi + 0x204]
mov byte [eax + 0x1d], 1
jmp 0x40c038
mov ecx, dword [esi + 0x204]
mov byte [ecx + 0x1d], 0
mov edx, dword [esi + 0x204]
mov eax, dword [0x45c4f4]
mov dword [edx + 0x1e], eax
mov ecx, dword [esi + 0x204]
mov edx, dword [0x45c4f8]
mov dword [ecx + 0x26], edx
mov eax, dword [esi + 0x204]
mov ecx, dword [0x45c500]
mov dword [eax + 0x2e], ecx
mov edx, dword [esi + 0x204]
mov eax, dword [0x45c504]
mov dword [edx + 0x32], eax
mov ecx, dword [esi + 0x204]
mov edx, dword [0x45c508]
mov dword [ecx + 0x36], edx
mov eax, dword [esi + 0x204]
mov ecx, dword [0x45c50c]
mov dword [eax + 0x3a], ecx
cmp dword [esi + 0x214], ebp
je 0x40c0a4
mov edx, dword [esi + 0x204]
mov byte [edx + 0x3e], 0
jmp 0x40c0ae
mov eax, dword [esi + 0x204]
mov byte [eax + 0x3e], 1
mov ecx, dword [esi + 0x204]
mov dl, byte [esi + 0x218]
mov byte [ecx + 0x3f], dl
mov eax, dword [0x45ca2c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov eax, dword [esi + 0x204]
add eax, 0x170
push eax
call fcn.00432a20
add esp, 0xc
xor eax, eax
lea ecx, [ecx]
mov ecx, dword [esi + 0x204]
mov dl, byte [eax + ecx + 0x170]
lea ecx, [eax + ecx + 0x170]
inc eax
cmp eax, 0x80
not dl
mov byte [ecx], dl
jl 0x40c0e0
mov eax, dword [esi + 0x204]
mov byte [eax + 0x1fe], 0x55
mov ecx, dword [esi + 0x204]
push ebp
mov ebp, dword [esp + 0x44]
mov byte [ecx + 0x1ff], 0xaa
mov eax, dword [0x45c4e8]
mov ecx, dword [ebp]
lea edx, [esp + 0x1c]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
or ebx, 0xffffffff
cmp eax, ebx
jne 0x40c15f
lea eax, [edi - 0x10]
mov dword [esp + 0x38], ebx
lea edx, [eax + 0xc]
lock xadd dword [edx], ebx
dec ebx
test ebx, ebx
jg 0x40c158
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40c1a6
mov edx, dword [esi + 0x204]
mov eax, dword [ebp]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x200
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
lea eax, [edi - 0x10]
mov dword [esp + 0x38], ebx
lea ecx, [eax + 0xc]
jne 0x40c191
lock xadd dword [ecx], ebx
dec ebx
jmp 0x40c14a
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x40c1a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 8