Function at 0x6108a4a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x6c
test eax, eax
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x52], 0
je 0x6108ab55
cmp eax, dword [0x610ef740]
je 0x6108ab55
cmp eax, 0x610ef81c
je 0x6108ab55
cmp byte [ebp - 0x52], 0
mov byte [ebp - 0x51], 0
je 0x6108a630
mov ecx, dword [0x610ef82c]
test ecx, ecx
je 0x6108a520
mov edx, dword [0x610ef740]
cmp dword [edx + 0x1dc], 0xffffffff
je 0x6108a520
mov ebx, dword [0x610edaec]
test ebx, ebx
je 0x6108a5f2
mov esi, esi
lea edi, [edi]
mov edx, dword [0x610f08a0]
test edx, edx
jne 0x6108a5ad
mov esi, esi
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x6108a5a0
cmp dword [ebp - 0x48], 0xffffffdc
je 0x6108a585
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6108a551
mov eax, dword [ebp - 0x50]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], 0x6108a240
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x50]
mov dword [esp], 0x610f089c
mov dword [esp + 0x10], eax
call fcn.6108fd50
jmp 0x6108a546
mov eax, dword [ebp - 0x50]
test eax, eax
jne 0x6108a594
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
jmp 0x6108a53d
mov dword [ebp - 0x50], 0x100
jmp 0x6108a53d
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6108a537
mov eax, dword [0x610edaec]
mov dword [esp + 0x18], eax
mov eax, dword [0x610ef740]
mov eax, dword [eax + 0x1dc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0x6108a280
mov dword [esp + 0x14], eax
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6108a530
mov eax, dword [0x610ef834]
test eax, eax
jne 0x6108ab45
xor ecx, ecx
cmp esi, 0x610ef81c
je 0x6108a623
mov eax, dword fs:[4]
sub eax, 0xfec
mov eax, dword [eax + 0x1c]
sub eax, 0x43227
cmp eax, 1
ja 0x6108a623
mov cl, 1
mov byte [ebp - 0x51], cl
mov esi, edx
nop
lea esi, [esi]
mov dword [esp], esi
call fcn.61088df0
sub esp, 4
test al, al
je 0x6108ab17
cmp byte [ebp - 0x52], 0
je 0x6108a9e5
mov edx, dword [0x610ef740]
mov eax, dword [edx + 0x1dc]
mov dword [ebp - 0x3c], eax
mov ebx, dword [0x610f08a0]
test ebx, ebx
jne 0x6108a9a0
cmp byte [ebp - 0x52], 0
je 0x6108a986
cmp dword [ebp - 0x48], 0xffffffdc
je 0x6108a998
cmp dword [ebp - 0x48], 0xffffffdf
je 0x6108a68f
mov ecx, dword [ebp - 0x48]
test ecx, ecx
jle 0x6108a986
mov edx, dword [0x610ef740]
lea eax, [edx + 0x1e0]
mov dword [ebp - 0x2c], eax
mov esi, esi
cmp byte [ebp - 0x51], 0
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x38], eax
mov eax, dword [edx]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x28], eax
jne 0x6108a921
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x44]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], 0x14
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x6108a6f5
cmp dword [ebp - 0x44], 0x14
je 0x6108a7da
cmp byte [ebp - 0x52], 0
jne 0x6108a753
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6108a726
mov edx, 0x307
mov eax, 0x6108a2c0
call fcn.61022e70
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6108a530
mov dword [esp + 0xc], 0x6108a300
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp + 0x10], eax
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6108a704
mov eax, dword [0x610ef82c]
test eax, eax
je 0x6108a773
mov eax, dword [0x610ef740]
cmp dword [eax + 0x1dc], 0xffffffff
je 0x6108a773
mov eax, dword [0x610edaec]
test eax, eax
je 0x6108a7a9
mov eax, dword [0x610f08a0]
test eax, eax
je 0x6108a530
mov dword [esp + 0xc], 0x6108a321
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6108a530
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x18], eax
mov eax, dword [esi]
mov dword [esp + 0xc], 0x6108a340
mov dword [esp + 8], 0x6108a200
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], 0x8000
mov dword [esp + 0x10], eax
jmp 0x6108a5e1
cmp byte [ebp - 0x51], 0
je 0x6108a8be
mov edi, dword [0x610f08a0]
test edi, edi
jne 0x6108a88e
mov dword [esp + 4], 0xea60
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
mov dword [ebp - 0x50], eax
sub esp, 8
mov ebx, dword [ebp - 0x50]
test ebx, ebx
je 0x6108a846
mov ecx, dword [0x610ef82c]
test ecx, ecx
je 0x6108a834
mov eax, dword [0x610ef740]
cmp dword [eax + 0x1dc], 0xffffffff
je 0x6108a834
mov edx, dword [0x610edaec]
test edx, edx
je 0x6108a85a
call sym.cygwin1.dll___errno
mov dword [eax], 0x58
mov dword [ebp - 0x50], 0xffffffff
cmp byte [ebp - 0x51], 0
je 0x6108a530
call fcn.61026ab0
jmp 0x6108a530
mov dword [esp + 0xc], 0x6108a380
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x8000
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], 0x610f089c
mov dword [esp + 0x10], eax
call fcn.6108fd50
jmp 0x6108a834
mov dword [esp + 0xc], 0x6108a3b9
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp + 0x10], eax
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6108a7f2
mov dword [ebp - 0x50], 0
mov esi, dword [0x610f08a0]
test esi, esi
jne 0x6108a8ec
cmp byte [ebp - 0x52], 0
jne 0x6108a846
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6108a80b
mov dword [esp + 0xc], 0x6108a3e0
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp + 0x14], eax
movzx eax, byte [ebp - 0x52]
mov dword [esp], 0x610f089c
mov dword [esp + 0x10], eax
call fcn.6108fd50
jmp 0x6108a8cf
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x610ef788
call sub.KERNEL32.dll_CreateEventA
mov dword [ebp - 0x30], eax
mov edx, dword [0x610f08a0]
sub esp, 0x10
test edx, edx
je 0x6108a6bb
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x6108a412
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6108a6bb
mov dword [ebp - 0x2c], 0
mov edx, dword [0x610ef740]
jmp 0x6108a6a0
lea eax, [ebp - 0x40]
mov dword [ebp - 0x2c], eax
jmp 0x6108a98d
movzx eax, byte [ebp - 0x52]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 0x18], eax
mov eax, dword [esi]
mov dword [esp + 0xc], 0x6108a420
mov dword [esp + 8], 0x6108a200
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
mov dword [esp + 0x10], eax
call fcn.6108fd50
jmp 0x6108a66a
mov eax, dword [esi + 0x18]
mov dword [esp + 4], 0
mov dword [esp], 0x40
mov dword [esp + 8], eax
call sub.KERNEL32.dll_OpenProcess
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x6108aae1
mov eax, dword [esi + 0x1dc]
xor ebx, ebx
test eax, eax
jne 0x6108aa3a
lea esi, [esi]
xor eax, eax
inc ebx
call fcn.61055610
mov eax, dword [esi + 0x1dc]
test eax, eax
jne 0x6108aa3a
cmp ebx, 0x270f
jle 0x6108aa20
mov dword [esp + 0x18], 2
lea eax, [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [0x610eda80]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [esi + 0x1dc]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.KERNEL32.dll_DuplicateHandle
sub esp, 0x1c
test eax, eax
je 0x6108aa82
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x6108aad1
mov dword [esp], edi
call sub.KERNEL32.dll_CloseHandle
mov esi, dword [0x610f08a0]
sub esp, 4
test esi, esi
jne 0x6108aaab
mov edx, 0x2e1
mov eax, 0x6108a2c0
call fcn.61022e70
jmp 0x6108a530
mov dword [esp + 0xc], 0x6108a449
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6108aa97
mov dword [esp], edi
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6108a65c
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6108aaf1
mov edx, 0x2d6
jmp 0x6108aa9c
mov dword [esp + 0xc], 0x6108a464
mov dword [esp + 8], 0x6108a200
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6108aaea
mov eax, dword [0x610f08a0]
test eax, eax
je 0x6108a530
mov eax, dword [ebp - 0x48]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov dword [esp + 0xc], 0x6108a47b
mov dword [esp + 0x10], eax
jmp 0x6108a5d1
call fcn.61088d70
mov edx, dword [0x610ef740]
jmp 0x6108a5ff
mov byte [ebp - 0x52], 1
jmp 0x6108a4e2