Function at 0x407050
Capabilities:
Create directory
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x443068]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
lea eax, [ebp - 0x218]
mov esi, ecx
push edi
push eax
call fcn.004166ad
add esp, 4
lea eax, [ebp - 0x218]
push eax
call fcn.004169d9
add esp, 4
add dword [eax + 0x14], 0x76c
mov edi, dword [eax + 0x10]
mov ebx, dword [eax + 0x14]
inc edi
mov eax, dword [eax + 0xc]
push 0xff
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.0040e750
add esp, 0xc
lea eax, [esi + 0x4b3c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x20c]
cmp eax, dword [esi + 0x4b78]
jne 0x4071b2
cmp edi, dword [esi + 0x4b7c]
jne 0x4071b2
cmp ebx, dword [esi + 0x4b80]
jne 0x4071b2
xor ebx, ebx
lea eax, [esi + 0x4938]
push ebx
push ebx
push 3
push ebx
push 1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x407119
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, dword [esi + 0x4b38]
jb 0x4072de
push 0
push 0x43ee90
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esi + 0x4934]
test eax, eax
je 0x40714f
push eax
call fcn.00416b3b
add esp, 4
mov dword [esi + 0x4934], 0
mov edi, 1
lea ebx, [esi + 0x4a37]
nop word [eax + eax]
push 0xff
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.0040e750
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push ebx
push str._s_part__d.log
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push 0x43ef44
push eax
call fcn.00416aad
add esp, 0x18
test eax, eax
je 0x407290
push eax
call fcn.00416b3b
add esp, 4
inc edi
jmp 0x407160
mov dword [esi + 0x4b78], eax
mov eax, dword [esi + 0x4934]
mov dword [esi + 0x4b7c], edi
mov dword [esi + 0x4b80], ebx
test eax, eax
je 0x4071e1
push eax
call fcn.00416b3b
add esp, 4
mov dword [esi + 0x4934], 0
push 0
push 0x43ee90
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x43ee64
push dword [esi + 0x4b80]
lea eax, [ebp - 0x108]
push dword [esi + 0x4b7c]
push dword [esi + 0x4b78]
push dword [esi + 0x4b74]
push dword [esi + 0x4b70]
push dword [esi + 0x4b6c]
push str.Log_02d._02d._04d____02d._02d._04d__s.log
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x24
lea eax, [ebp - 0x208]
push 0x43ee64
push dword [esi + 0x4b80]
push dword [esi + 0x4b7c]
push dword [esi + 0x4b78]
push str.Log_02d._02d._04d__s.log
push eax
call fcn.00407810
push 0xff
lea edi, [esi + 0x4a37]
push 0
push edi
call fcn.0040e750
lea ecx, [ebp - 0x208]
add esp, 0x24
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407273
sub ecx, edx
lea eax, [ecx - 4]
push eax
lea eax, [ebp - 0x208]
push eax
push edi
call fcn.0040dc50
add esp, 0xc
lea ecx, [ebp - 0x108]
lea edi, [esi + 0x4938]
mov eax, ecx
mov edx, edi
sub edx, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4072a2
cmp dword [esi + 0x4934], 0
jne 0x4072de
push 0x43eeb8
push edi
call fcn.00416aad
add esp, 8
mov dword [esi + 0x4934], eax
test eax, eax
jne 0x4072de
push str.Log_File_create_error.
push esi
call fcn.004073a0
add esp, 8
lea eax, [esi + 0x4b3c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040c303
mov esp, ebp
pop ebp
ret