Function at 0x40acf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455355
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x48f008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
test ecx, ecx
jne 0x40ad32
lea ebx, [ecx + 0x57]
jmp 0x40addb
cmp dword [edi + 0x10], 0
jne 0x40ad42
mov ebx, 0xd
jmp 0x40addb
xor eax, eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], ax
mov dword [ebp - 4], eax
xor bl, bl
call fcn.0040a9c0
mov esi, eax
mov dword [ebp - 0x54], 0x466998
mov dword [ebp - 0x50], esi
mov byte [ebp - 4], 1
test esi, esi
je 0x40ad85
push 0xffffffffffffffff
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.0040b450
add esp, 4
mov bl, al
mov byte [ebp - 4], 0
test esi, esi
je 0x40ad98
push 2
push esi
call fcn.0043fc69
add esp, 8
test bl, bl
jne 0x40adfb
mov ebx, 0x7a
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x40addb
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40add1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b308
push edx
push ecx
call fcn.0043fc69
add esp, 8
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043fc58
mov esp, ebp
pop ebp
ret 8
cmp byte [edi + 0x18], 0
je 0x40aee4
mov edx, dword [ebp - 0x20]
or esi, 0xffffffff
test edx, edx
je 0x40ae47
cmp edx, 0xffffffff
je 0x40ae47
cmp dword [ebp - 0x1c], 8
lea ecx, [ebp - 0x30]
push 0
cmovae ecx, dword [ebp - 0x30]
push 1
push 0x466a18
call fcn.0040bc10
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x40ae47
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
mov esi, ecx
cmovae eax, dword [ebp - 0x30]
sub esi, eax
sar esi, 1
cmp esi, 0xffffffff
je 0x40aee4
mov edi, 0xd
test esi, esi
jne 0x40ae5d
mov bl, 1
jmp 0x40ae75
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
movzx eax, word [eax + esi*2 - 2]
cmp di, ax
setne bl
je 0x40ae89
sub esp, 8
lea ecx, [ebp - 0x30]
mov edx, esi
call fcn.0040b500
add esp, 8
test al, al
je 0x40aee1
mov edx, dword [ebp - 0x20]
lea ecx, [esi + 1]
movzx eax, bl
or esi, 0xffffffff
add ecx, eax
cmp edx, ecx
jbe 0x40aed8
sub edx, ecx
cmp edx, 0xffffffff
je 0x40aed8
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
push 0
cmovae eax, dword [ebp - 0x30]
push 1
push 0x466a18
lea ecx, [eax + ecx*2]
call fcn.0040bc10
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x40aed8
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
mov esi, ecx
cmovae eax, dword [ebp - 0x30]
sub esi, eax
sar esi, 1
cmp esi, 0xffffffff
jne 0x40ae55
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
mov byte [ebp - 4], 2
cmp byte [edi + 0x19], 0
je 0x40af6a
cmp dword [ebp - 0x1c], 8
lea edx, [ebp - 0x30]
push dword [ebp - 0x20]
cmovae edx, dword [ebp - 0x30]
lea ecx, [ebp - 0x48]
call fcn.0040b580
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40af6a
mov edx, dword [ebp - 0x34]
cmp edx, 0x10
jb 0x40af53
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40af49
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b308
push edx
push ecx
call fcn.0043fc69
add esp, 8
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
jmp 0x40ada1
mov esi, dword [edi + 0x10]
test esi, esi
je 0x40b040
xor eax, eax
mov dword [ebp - 0x18], 0x2f005c
lea edx, [ebp - 0x18]
mov word [ebp - 0x14], ax
lea ecx, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40af90
sub edx, ecx
mov ecx, edi
sar edx, 1
cmp dword [edi + 0x14], 8
jb 0x40afa9
mov ecx, dword [edi]
push dword [ebp - 0x16]
lea eax, [ebp - 0x18]
push edx
push eax
push ecx
mov edx, esi
call fcn.0040bac0
add esp, 0x10
cmp eax, 0xffffffff
je 0x40b040
inc eax
cmp eax, esi
je 0x40b040
cmp eax, 0xffffffff
je 0x40b040
xor ecx, ecx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 7
mov word [ebp - 0x60], cx
push eax
push ecx
mov edx, edi
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x60]
call fcn.0040b6f0
add esp, 8
test al, al
je 0x40b006
cmp dword [ebp - 0x4c], 8
lea ecx, [ebp - 0x60]
cmovae ecx, dword [ebp - 0x60]
call fcn.00415510
mov edx, dword [ebp - 0x4c]
cmp edx, 8
jb 0x40b040
mov ecx, dword [ebp - 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b036
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b30d
push edx
push ecx
call fcn.0043fc69
add esp, 8
cmp byte [edi + 0x19], 0
je 0x40b059
cmp dword [ebp - 0x34], 0x10
lea ecx, [ebp - 0x48]
mov eax, dword [ebp - 0x38]
cmovae ecx, dword [ebp - 0x48]
mov dword [ebp - 0x64], ecx
jmp 0x40b06c
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x20]
add eax, eax
lea esi, [edi + 0x1c]
mov dword [ebp - 0x18], eax
test esi, esi
je 0x40b07f
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x14], 8
jb 0x40b087
mov edi, dword [edi]
test edi, edi
jne 0x40b090
lea ebx, [edi + 0x57]
jmp 0x40b0d0
push 0
push 0x80
push 4
push 0
push 7
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
test edi, edi
je 0x40b0b4
cmp edi, 0xffffffff
jne 0x40b12c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
je 0x40b12c
test edi, edi
je 0x40b0d0
cmp edi, 0xffffffff
je 0x40b0d0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40b0dd
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x34]
cmp edx, 0x10
jb 0x40af53
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b10b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b308
push edx
push ecx
call fcn.0043fc69
add esp, 8
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
jmp 0x40ada1
sub esp, 0xc
mov ecx, edi
call fcn.00415320
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40b1ab
test edi, edi
je 0x40b14f
cmp edi, 0xffffffff
je 0x40b14f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40b15c
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x34]
cmp edx, 0x10
jb 0x40af53
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b18a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b308
push edx
push ecx
call fcn.0043fc69
add esp, 8
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
jmp 0x40ada1
mov ecx, edi
call fcn.00405f00
test al, al
jne 0x40b1c0
mov ebx, 6
jmp 0x40b271
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x40b26c
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x40b26c
push 0
lea edx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40b1fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
je 0x40b200
jmp 0x40b271
xor ebx, ebx
test edi, edi
je 0x40b210
cmp edi, 0xffffffff
je 0x40b210
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40b21d
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x34]
cmp edx, 0x10
jb 0x40af53
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b24b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b308
push edx
push ecx
call fcn.0043fc69
add esp, 8
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
jmp 0x40ada1
mov ebx, 0x57
test edi, edi
je 0x40b281
cmp edi, 0xffffffff
je 0x40b281
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40b28e
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x34]
cmp edx, 0x10
jb 0x40b2be
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b2b4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b308
push edx
push ecx
call fcn.0043fc69
add esp, 8
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
cmp edx, 8
jb 0x40addb
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40add1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40add1
call fcn.0044316c
call fcn.0044316c
int3