Function at 0x457e64
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov byte [ebp - 1], al
mov esi, dword [ebp + 0x20]
xor eax, eax
push ebp
push 0x458229
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
push ebp
push 0x458209
push dword fs:[edx]
mov dword fs:[edx], esp
call sub.kernel32.dll_GetCurrentThreadId
cmp eax, dword [0x535dd4]
jne 0x457eb4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x458213
cmp byte [0x535ce4], 0
je 0x457ed9
call sub.kernel32.dll_GetCurrentThreadId
mov edx, dword [sym.imp.rtl160.bpl__System_MainThreadID]
cmp eax, dword [edx]
jne 0x457ed9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x458213
mov bl, 2
mov dword [ebp - 0x18], 0x53be40
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x18]
mov edi, eax
mov eax, dword [edi]
test eax, eax
je 0x457f05
push 0x8000
push 0
push eax
call sub.kernel32.dll_VirtualFree
xor eax, eax
mov dword [edi], eax
inc dword [ebp - 0x10]
add edi, 4
cmp dword [ebp - 0x10], 5
jne 0x457eee
add dword [ebp - 0x18], 0x10
dec bl
jne 0x457ee2
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x18]
push eax
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.00435bc4
cmp dword [ebp - 8], 0
je 0x457f79
mov edx, 0x458248
mov eax, dword [ebp - 8]
call fcn.00434b44
test al, al
je 0x457f79
call fcn.00401600
xor edx, edx
mov dword [eax], edx
call fcn.00401600
xor edx, edx
mov dword [eax + 4], edx
cmp byte [ebp + 0x24], 0
jne 0x457f6c
call fcn.0044f4b8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x458213
test esi, esi
jne 0x457f84
call fcn.0045f138
mov esi, eax
cmp dword [ebp + 0x1c], 0
jne 0x457f92
call fcn.0045f140
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x18], 0
je 0x457fcc
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 0xb8]
cmp eax, dword [ebp - 0xc]
ja 0x457fcc
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0xc]
sub edx, dword [eax + 0xb8]
cmp edx, 4
ja 0x457fcc
mov eax, dword [ebp + 0x18]
mov esi, dword [eax + 0xc4]
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 0xb4]
mov dword [ebp + 0x1c], eax
call sub.kernel32.dll_GetCurrentThreadId
mov dword [ebp - 0x4c], eax
movzx eax, byte [ebp - 1]
mov byte [ebp - 0x48], al
mov eax, dword [ebp - 8]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x40], eax
movzx eax, byte [ebp + 0x24]
mov byte [ebp - 0x3c], al
mov dword [ebp - 0x38], esi
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
movzx eax, byte [ebp + 0x14]
mov byte [ebp - 0x28], al
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, 0xfa
call fcn.004336f0
test al, al
je 0x458031
xor eax, eax
mov dword [ebp - 0x50], eax
jmp 0x458041
push 0
push 0
push 0xffffffffffffffff
push 0
call sub.kernel32.dll_CreateEventW
mov dword [ebp - 0x50], eax
mov al, 1
call fcn.0044157c
xor eax, eax
push ebp
push 0x458143
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x50], 0
je 0x458126
push 0
lea eax, [ebp - 0x10]
push eax
push 0x38
lea eax, [ebp - 0x50]
push eax
mov eax, dword [0x535de0]
push eax
call sub.kernel32.dll_WriteFile
test eax, eax
je 0x45811b
cmp dword [ebp - 0x10], 0x38
jne 0x45811b
call sub.kernel32.dll_GetCurrentThreadId
mov edx, dword [sym.imp.rtl160.bpl__System_MainThreadID]
cmp eax, dword [edx]
jne 0x458110
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 0xc]
call fcn.00446e00
mov eax, dword [ebp - 0x70]
mov edx, dword [eax]
call dword [edx + 0x38]
test al, al
jne 0x458110
jmp 0x4580fc
push 0
push 0
push 0
lea eax, [ebp - 0x6c]
push eax
call sub.user32.dll_GetMessageW
inc eax
cmp eax, 1
jbe 0x4580f1
cmp dword [ebp - 0x68], 0
jne 0x4580dd
cmp dword [0x535560], 0
je 0x4580dd
xor eax, eax
call dword [0x535560]
lea eax, [ebp - 0x6c]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x6c]
push eax
call sub.user32.dll_DispatchMessageW
jmp 0x4580fc
mov eax, dword [ebp - 0x64]
push eax
call sub.user32.dll_PostQuitMessage
jmp 0x45811b
push 0
mov eax, dword [ebp - 0x50]
push eax
call sub.kernel32.dll_WaitForSingleObject
cmp eax, 0x102
je 0x4580b1
jmp 0x45811b
push 0xffffffffffffffff
mov eax, dword [ebp - 0x50]
push eax
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x50]
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x45812e
lea eax, [ebp - 0x50]
call fcn.004577d4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45814a
xor eax, eax
call fcn.0044157c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x458230
lea eax, [ebp - 0x70]
call sub.rtl160.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
ret