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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ff51e
mov eax, dword fs:[0]
push eax
sub esp, 0x1b8
mov eax, dword [0x654c54]
xor eax, ebp
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1a4], ecx
mov eax, dword [ebp - 0x1a4]
movzx ecx, byte [eax + 0x50a]
test ecx, ecx
jne 0x51fff7
jmp 0x5204ae
mov dword [ebp - 0x10], 0
jmp 0x520009
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 4
jge 0x5204ae
mov eax, dword [ebp - 0x10]
shl eax, 8
mov ecx, dword [ebp - 0x1a4]
lea ecx, [ecx + eax + 0x108]
call fcn.00523840
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x52024d
push 0
push 0
lea ecx, [ebp - 0x3c]
call fcn.004079f0
mov edx, dword [0x611c1c]
push edx
push 0
mov eax, dword [ebp - 0x10]
shl eax, 8
mov ecx, dword [ebp - 0x1a4]
lea edx, [ecx + eax + 0x14c]
push edx
lea ecx, [ebp - 0x3c]
call fcn.0040aae0
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 0xe9], 0x2f
push 1
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0xe9]
push ecx
lea ecx, [ebp - 0x3c]
call fcn.00510580
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
jne 0x52009e
jmp 0x5200f0
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x40]
push eax
push 0
lea ecx, [ebp - 0x5c]
push ecx
lea ecx, [ebp - 0x3c]
call fcn.004bcd20
cmp dword [ebp - 0x44], 0x10
jb 0x5200ca
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x1a8], edx
jmp 0x5200d3
lea eax, [ebp - 0x58]
mov dword [ebp - 0x1a8], eax
mov ecx, dword [ebp - 0x1a8]
push ecx
call fcn.005d27b1
add esp, 4
push 0
push 1
lea ecx, [ebp - 0x5c]
call fcn.004079f0
jmp 0x520077
cmp dword [ebp - 0x24], 0x10
jb 0x520101
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x1ac], edx
jmp 0x52010a
lea eax, [ebp - 0x38]
mov dword [ebp - 0x1ac], eax
mov ecx, dword [ebp - 0x1ac]
push ecx
push str.AdFile:__s_r_n
lea edx, [ebp - 0xb0]
push edx
call fcn.00528d70
add esp, 0xc
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xf0]
cmp dword [eax + 0x18], 0x10
jb 0x520148
mov ecx, dword [ebp - 0xf0]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x1b0], edx
jmp 0x520157
mov eax, dword [ebp - 0xf0]
add eax, 4
mov dword [ebp - 0x1b0], eax
mov ecx, dword [ebp - 0x1b0]
push ecx
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
push 0
push 1
lea ecx, [ebp - 0xb0]
call fcn.004079f0
cmp dword [ebp - 0x24], 0x10
jb 0x520184
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x1b4], edx
jmp 0x52018d
lea eax, [ebp - 0x38]
mov dword [ebp - 0x1b4], eax
push 0x609f20
mov ecx, dword [ebp - 0x1b4]
push ecx
call fcn.005cc851
add esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x52021d
lea edx, [ebp - 0x78]
push edx
mov eax, dword [ebp - 0x10]
shl eax, 8
mov ecx, dword [ebp - 0x1a4]
lea ecx, [ecx + eax + 0x108]
call fcn.00523860
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0xf4], edx
cmp dword [ebp - 0x60], 0x10
jb 0x5201e0
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x1b8], eax
jmp 0x5201e9
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x1b8], ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0xf4]
push eax
push 1
mov ecx, dword [ebp - 0x1b8]
push ecx
call fcn.005ccec6
add esp, 0x10
mov edx, dword [ebp - 0x1c]
push edx
call fcn.005cc711
add esp, 4
push 0
push 1
lea ecx, [ebp - 0x78]
call fcn.004079f0
mov eax, dword [ebp - 0x10]
shl eax, 8
mov ecx, dword [ebp - 0x1a4]
lea ecx, [ecx + eax + 0x108]
call fcn.00523490
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.004079f0
jmp 0x520339
cmp dword [ebp - 0x14], 2
je 0x520339
cmp dword [ebp - 0x14], 1
je 0x520339
mov edx, dword [ebp - 0x10]
shl edx, 8
mov eax, dword [ebp - 0x1a4]
lea ecx, [eax + edx + 0x14c]
push ecx
push str.Error_on_AdFile:
lea edx, [ebp - 0xcc]
push edx
call fcn.0040f440
add esp, 0xc
mov dword [ebp - 0x1bc], eax
mov eax, dword [ebp - 0x1bc]
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 4], 1
push 0x6131cc
mov ecx, dword [ebp - 0x1c0]
push ecx
lea edx, [ebp - 0xe8]
push edx
call fcn.0040f1e0
add esp, 0xc
mov dword [ebp - 0xf8], eax
mov eax, dword [ebp - 0xf8]
cmp dword [eax + 0x18], 0x10
jb 0x5202e0
mov ecx, dword [ebp - 0xf8]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x1c4], edx
jmp 0x5202ef
mov eax, dword [ebp - 0xf8]
add eax, 4
mov dword [ebp - 0x1c4], eax
mov ecx, dword [ebp - 0x1c4]
push ecx
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
push 0
push 1
lea ecx, [ebp - 0xe8]
call fcn.004079f0
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0xcc]
call fcn.004079f0
mov edx, dword [ebp - 0x10]
shl edx, 8
mov eax, dword [ebp - 0x1a4]
lea ecx, [eax + edx + 0x108]
call fcn.00523490
cmp dword [ebp - 0x14], 2
je 0x5204a9
mov ecx, dword [ebp - 0x1a4]
mov edx, dword [ecx + 0x578]
mov dword [ebp - 0x11c], edx
cmp dword [ebp - 0x11c], 0
jbe 0x5204a9
mov eax, dword [ebp - 0x1a4]
add eax, 0x560
mov dword [ebp - 0x134], eax
mov ecx, dword [ebp - 0x134]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 0x128], edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax]
mov dword [ebp - 0x12c], ecx
mov edx, dword [ebp - 0x134]
push edx
mov eax, dword [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x124]
call fcn.0054a100
lea ecx, [ebp - 0x124]
call fcn.004edbb0
mov dword [ebp - 0x138], eax
push 0
push 0
lea ecx, [ebp - 0x94]
call fcn.004079f0
mov ecx, dword [0x611c1c]
push ecx
push 0
mov edx, dword [ebp - 0x138]
push edx
lea ecx, [ebp - 0x94]
call fcn.0040aae0
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x1a4]
add eax, 0x560
mov dword [ebp - 0x18c], eax
mov ecx, dword [ebp - 0x18c]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 0x164], edx
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax]
mov dword [ebp - 0x168], ecx
mov edx, dword [ebp - 0x18c]
push edx
mov eax, dword [ebp - 0x168]
push eax
lea ecx, [ebp - 0x158]
call fcn.0054a100
mov ecx, dword [ebp - 0x158]
mov edx, dword [ebp - 0x154]
mov dword [ebp - 0x150], ecx
mov dword [ebp - 0x14c], edx
mov eax, dword [ebp - 0x14c]
push eax
mov ecx, dword [ebp - 0x150]
push ecx
lea edx, [ebp - 0x160]
push edx
mov ecx, dword [ebp - 0x18c]
call fcn.0053cdb0
lea eax, [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0x1a4]
add ecx, 0x68
push ecx
mov edx, dword [ebp - 0x10]
shl edx, 8
mov eax, dword [ebp - 0x1a4]
lea ecx, [eax + edx + 0x108]
call fcn.00523330
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x94]
call fcn.004079f0
jmp 0x520000
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.005cbcb1
mov esp, ebp
pop ebp
ret