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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x50
mov esi, ecx
mov eax, dword [0x80e040]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
dec eax
lea ecx, [ebp - 0x34]
mov dword [ecx], eax
mov dword [ecx + 4], eax
call fcn.00577f60
mov eax, dword [esi + 0x3c]
test al, 0x10
mov dword [ebp - 0x50], esi
je 0x4ba9bb
mov eax, dword [esi + 0x24]
mov ebx, dword [esi + 0x38]
cmp ebx, eax
jae 0x4ba662
mov dword [esi + 0x38], eax
mov ebx, eax
mov esi, dword [esi + 0x20]
sub ebx, esi
js 0x4baa99
cmp ebx, 0x7ffffff8
jae 0x4ba979
cmp ebx, 0xa
jbe 0x4ba7df
mov edi, ebx
or edi, 7
inc edi
push edi
call fcn.005c8b59
add esp, 4
mov dword [ebp - 0x1c], eax
or edi, 0x80000000
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
lea edi, [eax + ebx]
cmp eax, esi
ja 0x4ba6af
cmp edi, esi
ja 0x4baa99
test ebx, ebx
je 0x4ba6be
push ebx
push esi
push eax
call fcn.005cc950
add esp, 0xc
mov esi, dword [ebp - 0x50]
lea ebx, [esi + 8]
mov byte [edi], 0
movsx eax, byte [ebp - 0x11]
test eax, eax
jns 0x4ba6d2
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x5c], eax
jns 0x4ba6e2
push dword [ebp - 0x1c]
call fcn.005c8b90
add esp, 4
mov eax, dword [esi + 8]
mov ecx, dword [eax + 4]
add ecx, ebx
lea esi, [ebp - 0x1c]
push esi
call fcn.005463c0
mov ecx, esi
push 0x814af0
call fcn.00549ed0
mov edi, eax
mov eax, dword [eax]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x8072c0]
mov ecx, edi
push 0xa
call esi
mov esi, dword [ebp - 0x50]
mov edi, ebx
mov ebx, eax
lea ecx, [ebp - 0x1c]
call fcn.00546550
movsx eax, bl
mov ecx, edi
push eax
call fcn.00411ba0
mov ecx, edi
call fcn.00410a40
xor eax, eax
dec eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x3c]
test al, 0x10
je 0x4ba9d8
mov eax, dword [esi + 0x24]
mov ebx, dword [esi + 0x38]
cmp ebx, eax
jae 0x4ba75b
mov dword [esi + 0x38], eax
mov ebx, eax
mov esi, dword [esi + 0x20]
sub ebx, esi
js 0x4baa99
cmp ebx, 0x7ffffff8
jae 0x4ba981
cmp ebx, 0xa
jbe 0x4ba7ea
mov edi, ebx
or edi, 7
inc edi
push edi
call fcn.005c8b59
add esp, 4
mov dword [ebp - 0x40], eax
or edi, 0x80000000
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
lea edi, [eax + ebx]
cmp eax, esi
ja 0x4ba7a4
cmp edi, esi
ja 0x4baa99
test ebx, ebx
je 0x4ba7b3
push ebx
push esi
push eax
call fcn.005cc950
add esp, 0xc
mov byte [edi], 0
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0x94]
movsx eax, byte [ebp - 0x35]
mov edx, eax
test eax, eax
jns 0x4ba7cc
mov edx, dword [ebp - 0x3c]
mov ebx, edx
sub ebx, ecx
jb 0x4ba989
test al, al
js 0x4ba81e
lea edi, [ebp - 0x40]
jmp 0x4ba821
lea eax, [ebp - 0x1c]
mov byte [eax + 0xb], bl
jmp 0x4ba6a0
lea eax, [ebp - 0x40]
mov byte [eax + 0xb], bl
jmp 0x4ba795
mov esi, ebx
or esi, 7
inc esi
push esi
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x58], edx
call fcn.005c8b59
mov edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
add esp, 4
mov dword [ebp - 0x4c], eax
or esi, 0x80000000
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x48], ebx
jmp 0x4ba83a
mov edi, dword [ebp - 0x40]
cmp ebx, 0x7ffffff8
jae 0x4ba991
add edi, ecx
cmp ebx, 0xa
ja 0x4ba7f2
lea eax, [ebp - 0x4c]
mov byte [eax + 0xb], bl
lea esi, [eax + ebx]
cmp eax, edi
ja 0x4ba849
cmp esi, edi
ja 0x4baa99
cmp edx, ecx
je 0x4ba858
push ebx
push edi
push eax
call fcn.005cc950
add esp, 0xc
mov byte [esi], 0
mov esi, dword [ebp - 0x50]
mov eax, dword [esi + 0x98]
mov ecx, dword [esi + 0x9c]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0x57
mov eax, dword [0x78ef14]
mov al, byte [eax + 0x57]
test al, al
jne 0x4baad8
cmp byte [ebp - 0x41], 0
jns 0x4ba898
push dword [ebp - 0x4c]
call fcn.005c8b90
add esp, 4
cmp dword [esi + 4], 3
je 0x4baa08
mov ecx, dword [0x8154a4]
test ecx, ecx
je 0x4ba8e3
mov eax, dword [esi + 4]
mov dword [ebp - 0x54], eax
mov edi, dword [esi + 0x94]
mov ebx, dword [esi + 0x9c]
mov eax, dword [ebp - 0x50]
mov esi, dword [eax + 0x98]
call dword [0x8072c0]
lea eax, [ebp - 0x40]
push eax
push edi
push ebx
push esi
mov esi, dword [ebp - 0x50]
push dword [ebp - 0x54]
call ecx
add esp, 0x14
test al, al
jne 0x4ba90c
mov eax, dword [0x8105bc]
test al, 2
jne 0x4ba999
test al, 4
jne 0x4ba941
test eax, 0xfffffffa
jne 0x4ba901
cmp dword [esi + 4], 2
jge 0x4ba941
test al, 1
mov esi, dword [ebp - 0x50]
jne 0x4baa9b
cmp dword [esi + 4], 3
je 0x4ba9f5
cmp byte [ebp - 0x35], 0
jns 0x4ba927
push dword [ebp - 0x40]
call fcn.005c8b90
add esp, 4
lea ecx, [ebp - 0x34]
call fcn.00577f90
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005c9f16
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
lea esi, [ebp - 0x40]
movsx edi, byte [esi + 0xb]
test edi, edi
cmovs edi, dword [esi + 4]
cmovs esi, dword [esi]
test edi, edi
je 0x4ba901
xor ebx, ebx
mov eax, edi
sub eax, ebx
lea ecx, [esi + ebx]
push eax
push ecx
push 2
call fcn.005e1946
add esp, 0xc
test eax, eax
jns 0x4bab0b
mov eax, dword [0x8105bc]
jmp 0x4ba901
lea ecx, [ebp - 0x1c]
call fcn.005fe450
lea ecx, [ebp - 0x40]
call fcn.005fe450
lea ecx, [ebp - 0x4c]
call fcn.005fe570
lea ecx, [ebp - 0x4c]
call fcn.005fe450
cmp byte [ebp - 0x35], 0
js 0x4ba9a4
lea eax, [ebp - 0x40]
jmp 0x4ba9a7
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x8105bc]
mov esi, dword [ebp - 0x50]
jmp 0x4ba8f0
xor ebx, ebx
mov esi, 0
test al, 8
je 0x4ba7df
mov eax, dword [ebp - 0x50]
mov esi, dword [eax + 0x14]
mov ebx, dword [eax + 0x1c]
jmp 0x4ba665
xor esi, esi
mov ebx, 0
test al, 8
je 0x4ba7ea
mov eax, dword [ebp - 0x50]
mov esi, dword [eax + 0x14]
mov ebx, dword [eax + 0x1c]
jmp 0x4ba75e
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
push dword [ebp - 0x5c]
call fcn.00646900
jmp 0x4ba916
mov bl, byte [0x8154c8]
test bl, bl
jne 0x4ba8a2
mov byte [0x8154c8], 1
mov eax, dword [0x8154d0]
mov ecx, dword [0x813560]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4bab1a
mov ecx, dword [ebp - 0x50]
lea esi, [ebp - 0x1c]
push esi
call fcn.00646850
movsx eax, byte [ebp - 0x11]
mov ecx, esi
test eax, eax
jns 0x4baa5a
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
test eax, eax
js 0x4baa99
sete dl
test ecx, ecx
setne dh
or dh, dl
je 0x4baa99
push eax
push ecx
push dword [0x8154cc]
call fcn.004d6800
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x4baa8b
push dword [ebp - 0x1c]
call fcn.005c8b90
add esp, 4
mov byte [0x8154c8], bl
mov esi, dword [ebp - 0x50]
jmp 0x4ba8a2
ud2
call fcn.00646560
test al, al
je 0x4ba90c
lea eax, [ebp - 0x40]
movsx ecx, byte [eax + 0xb]
test ecx, ecx
cmovs ecx, dword [eax + 4]
mov dword [ebp - 0x1c], 0xffffffff
cmovs eax, dword [eax]
push 0
lea edx, [ebp - 0x1c]
push edx
push ecx
push eax
push dword [0x815498]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4ba90c
movzx ecx, al
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
mov dword [eax], str.LogMessage
lea edx, [ebp - 0x2c]
lea edi, [ebp - 0x1c]
push edi
push eax
call fcn.00646e90
add esp, 8
jmp 0x4ba887
add ebx, eax
cmp ebx, edi
jb 0x4ba957
jmp 0x4ba972
push 0x8154d0
call fcn.005c8bdd
add esp, 4
cmp dword [0x8154d0], 0xffffffff
jne 0x4baa3e
push 0x400
push str.LOG_FATAL
call fcn.004d67e0
add esp, 8
mov dword [0x8154cc], eax
push 0x8154d0
call fcn.005c8c57
add esp, 4
jmp 0x4baa3e