Function at 0x405f40
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41cc1a
push eax
mov eax, 0x1260
mov dword fs:[0], esp
call fcn.00409a40
push ebx
push esi
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x1274], 0
call fcn.00416a2c
mov eax, dword [esp + 0x127c]
push 0
push 0x40
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x1280], 1
call fcn.00416aa1
test eax, eax
je 0x406329
push 0
push 0x424694
push str.FILEOP
push str.CapLoghistory.ini
call fcn.00406e70
add esp, 0x10
or ebx, 0xffffffff
lea ecx, [esp + 0x264]
mov dword [esp + 0x2c], eax
push ebx
push 0
call fcn.004068d0
mov eax, dword [0x42812c]
xor ecx, ecx
push 2
mov byte [esp + 0x1278], 2
mov cx, word [eax + 6]
mov edx, dword [eax + 2]
push ecx
push edx
lea ecx, [esp + 0x270]
call fcn.00406910
test eax, eax
je 0x406086
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x3c]
lea edx, [esp + 0x3c]
rep stosd dword es:[edi], eax
mov edi, str.SNDFILELOG
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x1e
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x42812c]
add ecx, 0x14
push ecx
push edx
call fcn.004093b0
add esp, 0xc
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x264]
push 0x38
push eax
call fcn.00406b40
cmp eax, 0x38
jne 0x406086
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x74]
push 0x65
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x26c]
stosb byte es:[edi], al
call fcn.00406ab0
cmp eax, 0x65
jne 0x406086
cmp byte [esp + 0x74], 0x64
je 0x4060ce
lea ecx, [esp + 0x14]
call fcn.00416dd1
lea ecx, [esp + 0x264]
mov byte [esp + 0x1274], 1
call fcn.004068e0
lea ecx, [esp + 0x14]
mov byte [esp + 0x1274], 0
call fcn.00416a5e
lea ecx, [esp + 0x127c]
mov dword [esp + 0x1274], ebx
call fcn.00415d0c
xor eax, eax
jmp 0x406356
mov eax, dword [0x424a70]
push ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea edx, [esp + 0x10]
mov bl, 4
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x127c], bl
call fcn.00416c84
test eax, eax
je 0x4062b2
lea ecx, [esp + 0x10]
call fcn.0041537a
lea ecx, [esp + 0x10]
call fcn.0041532e
push 0x42471c
lea ecx, [esp + 0x14]
call fcn.00414f95
mov esi, eax
test esi, esi
jl 0x40629c
lea eax, [esp + 0x38]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.00414efb
mov eax, dword [eax]
push eax
call fcn.00409bca
add esp, 4
lea ecx, [esp + 0x38]
mov ebp, eax
call fcn.00415d0c
cmp ebp, dword [esp + 0x30]
jbe 0x40629c
inc esi
lea ecx, [esp + 0x3c]
push esi
push ecx
lea ecx, [esp + 0x18]
call fcn.00414dc6
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x127c], 5
call fcn.00415df9
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1278], bl
call fcn.00415d0c
lea ecx, [esp + 0x14]
call fcn.0041537a
push 0x424718
lea ecx, [esp + 0x18]
call fcn.00414f95
mov esi, eax
test esi, esi
jl 0x40629c
mov ecx, 0x61
xor eax, eax
lea edi, [esp + 0xe0]
lea edx, [esp + 0x2c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
push edx
lea ecx, [esp + 0x1c]
stosb byte es:[edi], al
call fcn.00414efb
mov eax, dword [eax]
push 0x13
push eax
lea eax, [esp + 0x15b]
push eax
call fcn.004093b0
add esp, 0xc
lea ecx, [esp + 0x2c]
call fcn.00415d0c
mov eax, dword [0x42812c]
mov dword [esp + 0xe0], ebp
push 0x1e
lea edx, [esp + 0x133]
mov ecx, dword [eax + 0x82]
add eax, 0xb2
push eax
push edx
mov dword [esp + 0x15b], ecx
call fcn.004093b0
add esp, 0xc
inc esi
lea eax, [esp + 0x34]
lea ecx, [esp + 0x14]
push esi
push eax
call fcn.00414dc6
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x127c], 6
call fcn.00415df9
lea ecx, [esp + 0x34]
mov byte [esp + 0x1278], bl
call fcn.00415d0c
mov ecx, dword [esp + 0x14]
push 0xff
lea edx, [esp + 0x16b]
push ecx
push edx
call fcn.004093b0
add esp, 0xc
lea eax, [esp + 0xe0]
lea ecx, [esp + 0x268]
push 0x187
push eax
call fcn.00406b40
cmp eax, 0x187
jne 0x4062b2
push ebp
push 0x424694
push str.FILEOP
push str.CapLoghistory.ini
call fcn.00406f10
add esp, 0x10
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00416c84
test eax, eax
jne 0x4060fb
lea ecx, [esp + 0x18]
call fcn.00416dd1
mov eax, dword [esp + 0x1284]
pop ebp
test eax, eax
je 0x4062f3
mov ecx, 0x61
xor eax, eax
lea edi, [esp + 0xdc]
lea edx, [esp + 0xdc]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x187
push edx
lea ecx, [esp + 0x26c]
stosb byte es:[edi], al
call fcn.00406b40
lea ecx, [esp + 0x10]
mov byte [esp + 0x1274], 3
call fcn.00415d0c
lea ecx, [esp + 0xc]
mov byte [esp + 0x1274], 2
call fcn.00415d0c
lea ecx, [esp + 0x264]
mov byte [esp + 0x1274], 1
call fcn.004068e0
lea ecx, [esp + 0x14]
mov byte [esp + 0x1274], 0
call fcn.00416a5e
lea ecx, [esp + 0x127c]
mov dword [esp + 0x1274], 0xffffffff
call fcn.00415d0c
mov eax, 1
mov ecx, dword [esp + 0x126c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x126c
ret