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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
cmp dword [ebp + 8], 0
je 0x3001cf5c
cmp dword [ebp + 8], 0xffffffff
jne 0x3001cf6d
push 0x30001c70
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
cmp dword [ebp + 0x10], 0
jne 0x3001cf84
push 0x30001c70
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
cmp dword [ebp + 0xc], 0
jne 0x3001cf9b
push 0x30001c70
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x4c], ecx
push 0
push 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x28]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov dword [ebp - 0x5c], edx
cmp dword [ebp - 0x5c], 0
jne 0x3001cfd1
xor eax, eax
jmp 0x3001d292
push 0
lea eax, [ebp - 0x50]
push eax
push 4
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x3001cff6
cmp dword [ebp - 0x50], 4
je 0x3001cffd
xor eax, eax
jmp 0x3001d292
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x30]
add ecx, dword [ebp - 0x50]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x30], ecx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x24]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0x10]
add edx, 0x24
cmp dword [ebp - 4], edx
je 0x3001d28d
mov eax, dword [ebp - 4]
sub eax, 0x420
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x41c]
and ecx, 1
test ecx, ecx
jne 0x3001d049
jmp 0x3001d015
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x41c]
and eax, 4
test eax, eax
je 0x3001d08b
lea ecx, [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x2ec]
push eax
mov ecx, dword [ebp - 0x54]
add ecx, 0x20
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.3001c7b5
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x3001d092
xor eax, eax
jmp 0x3001d292
mov dword [ebp - 0x60], 0
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x41c]
and edx, 2
test edx, edx
je 0x3001d0ff
lea eax, [ebp - 0x64]
push eax
push 0
mov ecx, dword [ebp + 0x14]
and ecx, 8
neg ecx
sbb ecx, ecx
neg ecx
push ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx + 0x2f0]
sub ecx, dword [eax + 0x2f8]
mov edx, dword [edx + 0x2f4]
sbb edx, dword [eax + 0x2fc]
push ecx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x2f8]
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.3001ca7d
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x3001d106
xor eax, eax
jmp 0x3001d292
mov dword [ebp - 0x64], 0
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x41c]
and eax, 8
test eax, eax
je 0x3001d15e
lea ecx, [ebp - 0x58]
push ecx
push 1
mov edx, dword [ebp + 0x14]
and edx, 8
neg edx
sbb edx, edx
neg edx
push edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x308]
push ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x300]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.3001ca7d
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x3001d165
xor eax, eax
jmp 0x3001d292
mov dword [ebp - 0x58], 0
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x41c]
and edx, 0x10
test edx, edx
je 0x3001d1c4
mov eax, dword [ebp - 0x54]
cmp dword [eax + 0x318], 0
jbe 0x3001d1c4
push 0
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x318]
push edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x314]
push ecx
mov edx, dword [eax + 0x310]
push edx
mov eax, dword [ebp - 0x54]
add eax, 0x31c
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.3001c8b1
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x3001d1c4
xor eax, eax
jmp 0x3001d292
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 8]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x38], eax
mov ecx, dword [edx + 0x1c]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x2f8]
mov dword [ebp - 0x30], eax
mov ecx, dword [edx + 0x2fc]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx + 0x2f0]
sub ecx, dword [eax + 0x2f8]
mov edx, dword [edx + 0x2f4]
sbb edx, dword [eax + 0x2fc]
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x300]
mov dword [ebp - 0x18], edx
mov eax, dword [ecx + 0x304]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x308]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x2ec]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x1c], eax
push 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x34]
push edx
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.3001cb2a
mov dword [ebp - 0x5c], eax
jmp 0x3001d015
mov eax, 1
mov esp, ebp
pop ebp
ret 0x10