Function at 0x3001d969
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
cmp dword [ebp + 8], 0
je 0x3001d97b
cmp dword [ebp + 8], 0xffffffff
jne 0x3001d98c
push 0x30001c78
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
cmp dword [ebp + 0x10], 0
jne 0x3001d9a3
push 0x30001c78
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
cmp dword [ebp + 0xc], 0
jne 0x3001d9ba
push 0x30001c78
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
mov eax, dword [ebp + 0x10]
add eax, 0x3c
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x3c], eax
jne 0x3001d9d2
mov eax, 1
jmp 0x3001dc1e
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x50]
mov dword [ebp - 0x50], eax
push 0
push 0
mov ecx, dword [ebp - 0x50]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [ebp - 0x4c], ecx
cmp dword [ebp - 0x4c], 0
jne 0x3001da05
xor eax, eax
jmp 0x3001dc1e
mov dword [ebp - 0x18], 0x18
mov dword [ebp - 0x14], 0x20
mov dword [ebp - 0x10], 0x28
mov dword [ebp - 0xc], 8
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x20]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x50]
add ecx, 0x18
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x50]
add eax, 7
and eax, 0xfffffff8
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
sub ecx, dword [ebp - 0x44]
mov dword [ebp - 4], ecx
push 0
lea edx, [ebp - 0x48]
push edx
push 0x18
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x3001da73
cmp dword [ebp - 0x48], 0x18
je 0x3001da7a
xor eax, eax
jmp 0x3001dc1e
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x3c]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0x10]
add ecx, 0x3c
cmp dword [ebp - 0x1c], ecx
je 0x3001dc19
mov edx, dword [ebp - 0x1c]
sub edx, 0x5c
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
mov dword [ebp - 0x1c], ecx
push 0
push 0
mov edx, dword [ebp - 0x50]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [ebp - 0x4c], ecx
cmp dword [ebp - 0x4c], 0
jne 0x3001dacd
xor eax, eax
jmp 0x3001dc1e
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
mov dword [ebp - 0x40], eax
mov ecx, dword [edx + 4]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 8]
mov dword [ebp - 0x38], eax
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x30], eax
mov ecx, dword [edx + 0x14]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x18]
mov eax, dword [ebp - 0x50]
lea ecx, [eax + edx*8 + 0x48]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x50]
add eax, 7
and eax, 0xfffffff8
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
sub ecx, dword [ebp - 0x44]
mov dword [ebp - 0x24], ecx
push 0
lea edx, [ebp - 0x48]
push edx
push 0x20
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x3001db52
cmp dword [ebp - 0x48], 0x20
je 0x3001db59
xor eax, eax
jmp 0x3001dc1e
push 0
lea edx, [ebp - 0x48]
push edx
push 0x28
mov eax, dword [ebp - 0x20]
add eax, 0x20
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x3001db81
cmp dword [ebp - 0x48], 0x28
je 0x3001db88
xor eax, eax
jmp 0x3001dc1e
push 0
lea edx, [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x18]
shl ecx, 3
push ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x48]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x3001dbc0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x18]
shl eax, 3
cmp dword [ebp - 0x48], eax
je 0x3001dbc4
xor eax, eax
jmp 0x3001dc1e
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x4c]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x20]
add eax, 0x4c
cmp dword [ebp - 0x54], eax
je 0x3001da83
mov ecx, dword [ebp - 0x54]
sub ecx, 0xc
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx]
mov dword [ebp - 0x54], eax
push 0
push 3
push 0
mov ecx, dword [ebp - 0x58]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.3001cc35
test eax, eax
jne 0x3001dbcd
xor eax, eax
jmp 0x3001dc1e
mov eax, 1
mov esp, ebp
pop ebp
ret 0xc