Function at 0x4040b9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x5c4eb0
push str.CALMIFInfo::WriteLog
push 5
mov esi, ecx
xor edi, edi
call fcn.00424dad
add esp, 0xc
mov dword [ebp - 4], esi
lea eax, [esi + 0xac]
mov ebx, 0xac
mov ecx, esi
push 4
push eax
push ebx
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xb0]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xb4]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xb8]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xbc]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xc0]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xc4]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xc8]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xcc]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xd0]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xd4]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xd8]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xdc]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xe0]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xe4]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xe8]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xec]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xf0]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xf4]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xf8]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0xfc]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x100]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x104]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x108]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x10c]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x110]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x114]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x118]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x11c]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x120]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x124]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x128]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x12c]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x130]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x134]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x138]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x13c]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x140]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x144]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x148]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x14c]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x150]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
push 4
lea eax, [esi + 0x154]
mov ecx, esi
push eax
mov eax, esi
sub eax, dword [ebp - 4]
add eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401eb5
test eax, eax
je 0x404766
lea edi, [esi + 0x158]
cmp dword [edi + 0x14], 8
jb 0x4046f5
mov eax, dword [edi]
jmp 0x4046f7
mov eax, edi
push eax
call fcn.004366b8
pop ecx
test eax, eax
je 0x404713
cmp dword [edi + 0x14], 8
jb 0x40470a
mov edi, dword [edi]
push 0x40
push 0x5c5154
jmp 0x404722
cmp dword [edi + 0x14], 8
jb 0x40471b
mov edi, dword [edi]
push 0x40
push 0x5c515c
push edi
call fcn.0058eded
mov edi, eax
add esp, 0xc
test edi, edi
je 0x404766
push edi
push ebx
push 1
push esi
call fcn.0058f639
add esp, 0x10
cmp eax, ebx
jne 0x404766
push 0x5c4ecc
push str.CALMIFInfo::WriteLog
push 5
call fcn.00424dad
add esp, 0xc
test edi, edi
je 0x404761
push edi
call fcn.0058f1d2
pop ecx
xor eax, eax
inc eax
jmp 0x404787
push 0x5c4ee8
push str.CALMIFInfo::WriteLog
push 5
call fcn.00424dad
add esp, 0xc
test edi, edi
je 0x404785
push edi
call fcn.0058f1d2
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret