Function at 0x588c10
Capabilities:
Create directory
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov byte [sym.postgres.exe_IsUnderPostmaster], 1
call dword [sym.imp.MSVCR100.dll__getpid]
push 0
mov dword [sym.postgres.exe_MyProcPid], eax
call dword [sym.imp.MSVCR100.dll__time32]
cdq
mov dword [sym.postgres.exe_MyStartTime], eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [0x868004], edx
mov eax, dword [eax + 0xc]
push eax
mov dword [ebp - 0x10], edx
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 8
test eax, eax
je 0x588c8d
push 0x4008
push eax
call dword [sym.imp.MSVCR100.dll__open_osfhandle]
add esp, 8
test eax, eax
jle 0x588c8d
push 0x7362f4
push eax
call dword [sym.imp.MSVCR100.dll__fdopen]
push 0
push 4
push 0
push eax
mov dword [0x836da0], eax
call dword [sym.imp.MSVCR100.dll_setvbuf]
add esp, 0x18
push 0x6aaa59
push 0x6aaa59
push 0x6aaa59
push str.logger_process
mov byte [sym.postgres.exe_am_syslogger], 1
call sym.postgres.exe_init_ps_display
add esp, 0x10
cmp byte [sym.postgres.exe_redirection_done], 0
je 0x588d27
push 0
push 1
push 0x7364d8
call sym.postgres.exe_pgwin32_open
mov edi, dword [sym.imp.MSVCR100.dll___iob_func]
mov esi, eax
call edi
mov ebx, dword [sym.imp.MSVCR100.dll__fileno]
add eax, 0x20
push eax
call ebx
push eax
call dword [sym.imp.MSVCR100.dll__close]
call edi
add eax, 0x40
push eax
call ebx
push eax
call dword [sym.imp.MSVCR100.dll__close]
add esp, 0x1c
cmp esi, 0xffffffff
je 0x588d49
call edi
add eax, 0x20
push eax
call ebx
push eax
push esi
call dword [sym.imp.MSVCR100.dll__dup2]
call edi
add eax, 0x40
push eax
call ebx
push eax
push esi
call dword [sym.imp.MSVCR100.dll__dup2]
push esi
call dword [sym.imp.MSVCR100.dll__close]
add esp, 0x1c
jmp 0x588d49
push 0x4000
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll__fileno]
add esp, 4
push eax
call dword [sym.imp.MSVCR100.dll__setmode]
add esp, 8
mov eax, dword [0x836dbc]
test eax, eax
je 0x588d59
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x836dbc], 0
call sym.postgres.exe_InitializeLatchSupport
push 0x836960
call sym.postgres.exe_InitLatch
push 0x5880c0
push 1
call sym.postgres.exe_pqsignal
push 1
push 2
call sym.postgres.exe_pqsignal
push 1
push 0xf
call sym.postgres.exe_pqsignal
push 1
push 3
call sym.postgres.exe_pqsignal
push 1
push 0xe
call sym.postgres.exe_pqsignal
push 1
push 0xd
call sym.postgres.exe_pqsignal
push 0x5880f0
push 0x1e
call sym.postgres.exe_pqsignal
push 1
push 0x1f
call sym.postgres.exe_pqsignal
add esp, 0x44
push 0
push 0x14
call sym.postgres.exe_pqsignal
push 0
push 0x15
call sym.postgres.exe_pqsignal
push 0
push 0x16
call sym.postgres.exe_pqsignal
push 0
push 0x13
call sym.postgres.exe_pqsignal
push 0
push 0x1c
call sym.postgres.exe_pqsignal
mov ecx, dword [0x869288]
push ecx
call sym.postgres.exe_pqsigsetmask
add esp, 0x2c
push 0x836978
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x836978
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0
push 0
push 0x588a80
push 0
push 0
call dword [sym.imp.MSVCR100.dll__beginthreadex]
add esp, 0x18
mov dword [0x836dc0], eax
test eax, eax
jne 0x588e59
push 0x7364c8
push 0x126
push str.src_backendpostmaster_syslogger.c
call sym.postgres.exe_elog_start
push str.could_not_create_syslogger_data_transfer_thread:__m
push 0x15
call sym.postgres.exe_elog_finish
add esp, 0x14
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
mov edx, dword [sym.postgres.exe_first_syslogger_file_time]
mov eax, dword [0x836dac]
push 0x400
push ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], eax
call sym.postgres.exe_MemoryContextAlloc
mov edx, dword [sym.postgres.exe_Log_directory]
push edx
push 0x736358
mov esi, eax
push 0x400
push esi
call sym.postgres.exe_pg_snprintf
mov eax, esi
add esp, 0x18
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x588ea0
sub eax, edx
mov edi, eax
mov eax, dword [sym.postgres.exe_log_timezone]
push eax
lea ecx, [ebp - 0x1c]
push ecx
call sym.postgres.exe_pg_localtime
mov edx, dword [sym.postgres.exe_Log_filename]
push eax
push edx
mov eax, 0x400
sub eax, edi
push eax
add edi, esi
push edi
call sym.postgres.exe_pg_strftime
mov ecx, dword [sym.postgres.exe_Log_directory]
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
push ecx
push edx
mov dword [0x836db0], esi
call sym.postgres.exe_MemoryContextStrdup
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
mov dword [ebp + 0xc], eax
mov eax, dword [sym.postgres.exe_Log_filename]
push eax
push ecx
call sym.postgres.exe_MemoryContextStrdup
mov edx, dword [sym.postgres.exe_Log_RotationAge]
add esp, 0x28
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
call fcn.00588030
xor bl, bl
push 0x836960
mov byte [ebp - 0xc], bl
xor esi, esi
call sym.postgres.exe_ResetLatch
mov eax, dword [0x836dc4]
add esp, 4
test eax, eax
je 0x58903b
push 2
mov dword [0x836dc4], esi
call sym.postgres.exe_ProcessConfigFile
mov ecx, dword [ebp + 0xc]
mov eax, dword [sym.postgres.exe_Log_directory]
add esp, 4
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x588f70
test dl, dl
je 0x588f6c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x588f70
add eax, 2
add ecx, 2
test dl, dl
jne 0x588f50
xor eax, eax
jmp 0x588f75
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, esi
je 0x588fb4
mov ecx, dword [ebp + 0xc]
push ecx
call sym.postgres.exe_pfree
mov edx, dword [sym.postgres.exe_Log_directory]
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
push edx
push eax
call sym.postgres.exe_MemoryContextStrdup
mov ecx, dword [sym.postgres.exe_Log_directory]
mov edi, 1
push ecx
mov dword [ebp + 0xc], eax
mov dword [0x836dc8], edi
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 0x10
jmp 0x588fb9
mov edi, 1
mov ecx, dword [ebp - 4]
mov eax, dword [sym.postgres.exe_Log_filename]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x588fe1
test dl, dl
je 0x588fdd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x588fe1
add eax, 2
add ecx, 2
test dl, dl
jne 0x588fc1
xor eax, eax
jmp 0x588fe6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x589011
mov edx, dword [ebp - 4]
push edx
call sym.postgres.exe_pfree
mov eax, dword [sym.postgres.exe_Log_filename]
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
push eax
push ecx
call sym.postgres.exe_MemoryContextStrdup
add esp, 0xc
mov dword [ebp - 4], eax
mov dword [0x836dc8], edi
mov eax, dword [sym.postgres.exe_Log_RotationAge]
cmp dword [ebp - 8], eax
je 0x589023
mov dword [ebp - 8], eax
call fcn.00588030
cmp byte [0x836d9c], 0
je 0x589040
mov byte [0x836d9c], 0
mov dword [0x836dc8], edi
jmp 0x589040
mov edi, 1
cmp dword [sym.postgres.exe_Log_RotationAge], esi
jle 0x589082
cmp byte [0x836d9c], 0
jne 0x589082
push 0
call dword [sym.imp.MSVCR100.dll__time32]
cdq
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
cmp edx, dword [0x836974]
jl 0x589082
jg 0x589077
mov edx, eax
cmp edx, dword [0x836970]
jb 0x589082
mov bl, 1
mov byte [ebp - 0xc], bl
mov dword [0x836dc8], edi
mov eax, dword [0x836dc8]
test eax, eax
jne 0x5890ee
cmp dword [sym.postgres.exe_Log_RotationSize], esi
jle 0x5890ee
cmp byte [0x836d9c], al
jne 0x5890ee
mov ecx, dword [0x836da0]
mov edi, dword [sym.imp.MSVCR100.dll_ftell]
push ecx
call edi
mov edx, dword [sym.postgres.exe_Log_RotationSize]
shl edx, 0xa
add esp, 4
cmp eax, edx
jl 0x5890c5
mov esi, 1
mov dword [0x836dc8], esi
mov eax, dword [0x836da4]
test eax, eax
je 0x5890ee
push eax
call edi
mov ecx, dword [sym.postgres.exe_Log_RotationSize]
shl ecx, 0xa
add esp, 4
cmp eax, ecx
jl 0x5890ee
mov dword [0x836dc8], 1
or esi, 8
mov edx, dword [0x836dc8]
test edx, edx
je 0x589112
test bl, bl
jne 0x589105
test esi, esi
jne 0x589105
mov esi, 9
mov eax, dword [ebp - 0xc]
push esi
push eax
call fcn.00588380
add esp, 8
xor edi, edi
cmp dword [sym.postgres.exe_Log_RotationAge], edi
jle 0x589162
cmp byte [0x836d9c], 0
jne 0x589162
mov eax, dword [0x836970]
sub eax, dword [ebp - 0x14]
mov ecx, dword [0x836974]
sbb ecx, dword [ebp - 0x10]
js 0x58915b
jg 0x58913e
cmp eax, edi
jbe 0x58915b
cmp ecx, edi
jl 0x589153
jg 0x58914b
cmp eax, 0x20c49b
jbe 0x589153
mov eax, 0x20c49b
mov dword [ebp - 0x20], edi
imul eax, eax, 0x3e8
mov edi, eax
mov esi, 8
jmp 0x589167
or edi, 0xffffffff
xor esi, esi
push 0x836978
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
or esi, 1
push esi
push 0x836960
call sym.postgres.exe_WaitLatch
add esp, 0xc
push 0x836978
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x836d93], 0
je 0x588f14
push 0
push 0x7364c8
push 0x204
push str.src_backendpostmaster_syslogger.c
push 0xe
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5891ce
push str.logger_shutting_down
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 8
push 0
call sym.postgres.exe_proc_exit
add esp, 4
jmp 0x588f14