Function at 0x1005293
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [reloc.msvcrt.dll___p__commode]
xor eax, dword [ebp + 4]
push ebx
xor ebx, ebx
mov dword [ebp - 4], eax
xor eax, eax
cmp dword [reloc.msvcrt.dll___p__commode], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
jne 0x1005193
inc eax
jmp 0x100527b
push esi
push edi
lea edi, [ebp - 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0101b71a
cmp eax, ebx
jne 0x100523f
mov eax, dword [ebp + 8]
cmp eax, 2
jle 0x10051c6
imul eax, eax, 0xac
add eax, 0x38
mov dword [ebp - 0x10], eax
jmp 0x10051cd
mov dword [ebp - 0x10], 0xe4
push dword [0x1020050]
mov esi, dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
push ebx
mov edi, 0xf001f
push edi
call esi
cmp eax, ebx
mov dword [reloc.msvcrt.dll___p__commode], eax
jne 0x1005222
push dword [0x1020050]
lea eax, [ebp - 0x2c]
push 0x10000
push ebx
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [reloc.msvcrt.dll___p__commode], eax
jne 0x1005222
push dword [0x1020050]
push ebx
push 6
call esi
cmp eax, ebx
mov dword [reloc.msvcrt.dll___p__commode], eax
je 0x1005239
push ebx
push ebx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
mov dword [reloc.msvcrt.dll___p__commode], edi
jne 0x100528b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2759
push 1
push 1
call fcn.010042e8
cmp dword [ebp - 0x28], ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x1005265
push dword [ebp - 0x28]
push ebx
push dword [0x1024f78]
call esi
cmp dword [ebp - 0x14], ebx
je 0x1005276
push dword [ebp - 0x14]
push ebx
push dword [0x1024f78]
call esi
mov eax, dword [ebp - 0xc]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.0101ed84
leave
ret 4
mov ecx, dword [ebp - 0x10]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 8]
cmp eax, ebx
mov esi, dword [reloc.msvcrt.dll___p__commode]
mov dword [esi], 1
mov dword [esi + 4], eax
mov dword [ebp - 0xc], ebx
jle 0x100534a
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
lea edi, [esi + 0x40]
mov eax, dword [reloc.msvcrt.dll___p__commode]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + eax + 4]
lea ecx, [ebp - 0x3c]
push ecx
push eax
mov dword [edi - 4], eax
call fcn.0101b6d0
push 0x13
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x3c]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x10052fe
mov ecx, dword [ebp - 8]
add ecx, eax
mov word [esi + ecx*2 + 0x40], bx
jmp 0x100532d
push dword [ebp - 0xc]
lea eax, [ebp - 0x20]
push 0x1001608
push 9
push eax
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x10
push 0x13
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
jne 0x10052f2
mov word [edi], bx
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x10], 0x5c
add dword [ebp - 8], 0x56
add edi, 0xac
cmp eax, dword [ebp + 8]
jl 0x10052c4
mov dword [ebp - 0xc], 1
jmp 0x100524e