Function at 0x40bfc0
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x94
mov edi, ecx
mov eax, dword [0x50302c]
xor eax, esp
mov dword [esp + 0x90], eax
mov dword [esp + 0x8c], 0x400
push 0
push 2
push 0x400
call fcn.00436250
add esp, 0xc
mov dword [esp + 0x28], eax
push 0
push 0x14
push dword [edi + 0x12c]
call fcn.00436250
add esp, 0xc
mov cl, byte [edi + 0xbe]
cmp cl, byte [edi + 0x135]
mov ebp, eax
setne al
cmp byte [edi + 0xc4], 0
mov byte [esp + 0x2c], al
je 0x40c052
cmp byte [edi + 0x134], 0
je 0x40c05c
mov eax, 0x40000000
cmp byte [edi + 0xc7], 0
jne 0x40c061
xor eax, eax
cmp byte [edi + 0x10ce], 0
sete al
shl eax, 0x1e
jmp 0x40c061
mov dword [esp + 0x54], 0
jmp 0x40c077
mov eax, 0x20000000
mov ecx, eax
or ecx, 0x10000000
cmp byte [edi + 0xae], 0
cmove ecx, eax
mov dword [esp + 0x54], ecx
mov edx, dword [edi + 0x94]
mov esi, edx
sub esi, dword [edi + 0x10]
mov ecx, edi
push 0x17b6
call fcn.0040bbc0
add esp, 4
mov ebx, dword [edi + 0x98]
mov ecx, edi
mov dword [esp + 4], eax
mov edx, eax
push esi
call fcn.00411ca0
add esp, 4
test eax, eax
mov dword [esp + 0x3c], esi
je 0x40d3b5
mov ecx, dword [edi + 0x10a4]
lea edx, [esi + esi*4]
mov ecx, dword [ecx + edx*4 + 0xc]
mov ebx, dword [ecx + ebx*4]
mov esi, dword [esp + 4]
test ebx, ebx
jle 0x40c0dd
lea ecx, [ebx + ebx*4]
xor edx, edx
cmp dword [eax + ecx*4], 0xdfff
sete dl
sub ebx, edx
mov dword [esp + 0x58], ebx
cmp byte [esi + 0xc], 0
je 0x40c0fb
push dword [esi + 0x14]
call fcn.004362e0
add esp, 4
push esi
call fcn.004362e0
add esp, 4
mov ecx, dword [edi + 0x20]
test ecx, ecx
js 0x40c16d
mov eax, dword [edi + 0x1c]
mov edx, dword [esp + 0x54]
cmp dword [edi + 0x24], edx
mov edx, dword [esp + 0x3c]
jne 0x40c11c
cmp ecx, edx
jne 0x40c11c
cmp eax, dword [esp + 0x58]
je 0x40c16d
mov edx, dword [edi + 0x18]
mov ecx, dword [edx + ecx*4]
mov ecx, dword [ecx + 0x14]
lea edx, [eax + eax*4]
lea esi, [ecx + edx*4]
test eax, eax
jle 0x40c141
cmp dword [esi], 0xdfff
jne 0x40c141
or dword [esi - 0x10], 0x3ffff
mov eax, dword [edi + 0x1c]
mov ebx, dword [edi + 0x12c]
add ebx, 0xffffffff
cmp eax, ebx
jge 0x40c15e
cmp dword [esi + 0x14], 0xdfff
jne 0x40c15e
or dword [esi + 0x18], 0x3ffff
or dword [ecx + edx*4 + 4], 0x3ffff
mov dword [edi + 0x24], 0
mov dword [edi + 0x20], 0xffffffff
mov dword [edi + 0x1c], 0xffffffff
cmp dword [edi + 0x128], 0
jle 0x40d387
xor eax, eax
mov cl, byte [esp + 0x2c]
mov al, cl
shl eax, 0x14
mov dword [esp + 0x70], eax
xor esi, esi
mov dword [esp], edi
mov dword [esp + 0x44], ebp
jmp 0x40c1d7
push dword [ebx + 0x14]
call fcn.004362e0
add esp, 4
push ebx
call fcn.004362e0
add esp, 4
mov esi, dword [esp + 0x1c]
add esi, 1
cmp esi, dword [edi + 0x128]
jge 0x40d387
mov edx, dword [edi + 0x10]
add edx, esi
mov ecx, edi
mov dword [esp + 0x24], edx
push 0x17ec
call fcn.0040bbc0
add esp, 4
mov ebx, eax
mov ecx, edi
mov edx, eax
push esi
call fcn.00411ca0
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
mov ebp, esi
je 0x40c220
mov eax, dword [edi + 0x10a4]
lea ecx, [ebp*4]
add ecx, ebp
mov ecx, dword [eax + ecx*4 + 0x10]
jmp 0x40c229
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x2c], eax
xor ecx, ecx
mov eax, dword [edi + 0x12c]
test eax, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x48], ebx
jle 0x40c740
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 8], ecx
jmp 0x40c295
mov edx, dword [esp + 0x44]
mov dword [edx + ebx + 4], esi
mov eax, dword [esp + 4]
mov dword [edx + ebx], eax
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x88]
mov dword [edx + ebx + 0xc], ecx
mov dword [edx + ebx + 8], eax
mov dword [edx + ebx + 0x10], 0
add ebp, 1
mov eax, dword [edi + 0x12c]
add ebx, 0x14
cmp ebp, eax
mov ecx, dword [esp + 8]
jge 0x40c5a0
mov edx, ebp
test ecx, ecx
je 0x40c29e
mov edx, dword [ecx + ebp*4]
mov dword [esp + 0xc], edx
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + ebx + 4]
mov ecx, edx
and ecx, 0xfffc0000
or ecx, 0x20500
cmp byte [edi + 0x10ad], 0
cmovne ecx, edx
cmp byte [edi + 0x1107], 0
je 0x40c2f0
cmp byte [edi + 0x1108], 0
je 0x40c340
mov edi, dword [esp + 0x2c]
mov edx, dword [edi + ebx + 8]
mov esi, dword [edi + ebx + 0xc]
mov dword [esp + 0x88], esi
mov dword [esp + 0x84], edx
jmp 0x40c35a
mov edx, ecx
and edx, 0x1ff
add edx, 0xfffffff0
mov esi, ecx
and esi, 0xfffffe00
or esi, 0x100
cmp edx, 0xf0
cmovae esi, ecx
mov edx, esi
shr edx, 9
and edx, 0x1ff
add edx, 0xfffffff0
mov ecx, esi
and ecx, 0xfffc01ff
or ecx, 0x20400
cmp edx, 0xf0
cmovae ecx, esi
cmp byte [edi + 0x1108], 0
jne 0x40c2d4
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov edi, dword [esp + 0x2c]
mov edx, dword [edi + ebx]
mov dword [esp + 4], edx
and edx, 0xffffff00
cmp edx, 0xda00
je 0x40c3a0
cmp edx, 0xd900
je 0x40c3c0
cmp edx, 0xd800
jne 0x40c3e0
mov edi, dword [esp]
mov edx, dword [edi + 0x106c]
movzx esi, byte [esp + 4]
lea edx, [edx + esi*2]
add edx, 0x20c
jmp 0x40c3d7
mov edi, dword [esp]
mov edx, dword [edi + 0x106c]
movzx esi, byte [esp + 4]
lea edx, [edx + esi*2]
add edx, 0xc
jmp 0x40c3d7
mov edi, dword [esp]
mov edx, dword [edi + 0x106c]
movzx esi, byte [esp + 4]
lea edx, [edx + esi*2]
add edx, 0x60c
movzx edx, word [edx]
mov dword [esp + 4], edx
jmp 0x40c3e3
mov edi, dword [esp]
add eax, 0xffffffff
cmp ebp, eax
jge 0x40c400
mov eax, ecx
or eax, 0x400000
mov edx, dword [esp + 0x2c]
cmp dword [edx + ebx + 0x14], 0xdfff
cmove ecx, eax
mov eax, dword [edi + 0xe28]
and eax, 0xfffffffe
cmp eax, 2
jne 0x40c4c0
cmp dword [edi + 0xe2c], 0
mov esi, dword [edi + 0xe34]
mov edx, dword [edi + 0xe38]
je 0x40c461
cmp esi, dword [esp + 0x24]
jg 0x40c4c0
cmp edx, dword [esp + 0xc]
jg 0x40c4c0
mov esi, ecx
xor esi, dword [esp + 0x70]
xor eax, eax
mov edx, dword [esp + 0x24]
cmp edx, dword [edi + 0xe3c]
jg 0x40c4c8
mov edx, dword [esp + 0xc]
cmp edx, dword [edi + 0xe40]
mov edx, dword [esp + 0x3c]
jl 0x40c4ac
jmp 0x40c4cc
xor eax, eax
cmp edx, dword [esp + 0xc]
setle al
xor edx, edx
cmp esi, dword [esp + 0x24]
setl dl
cmove edx, eax
cmp dl, 1
jne 0x40c4c0
xor eax, eax
mov edx, dword [esp + 0xc]
cmp edx, dword [edi + 0xe40]
setl al
xor edx, edx
mov esi, dword [esp + 0x24]
cmp esi, dword [edi + 0xe3c]
setl dl
cmove edx, eax
mov esi, ecx
xor esi, dword [esp + 0x70]
xor eax, eax
test dl, dl
mov edx, dword [esp + 0x3c]
je 0x40c4cc
mov eax, 0x100000
jmp 0x40c4cc
mov esi, ecx
xor esi, dword [esp + 0x70]
xor eax, eax
mov edx, dword [esp + 0x3c]
xor esi, eax
cmp byte [edi + 0xc9], 0
je 0x40c508
and ecx, 0x200000
je 0x40c508
cmp byte [edi + 0x134], 0
je 0x40c502
cmp byte [edi + 0xc8], 0
je 0x40c502
mov eax, dword [edi + 0x106c]
movzx eax, word [eax + 0x24c]
mov dword [esp + 4], eax
and esi, 0xffdfffff
mov eax, dword [edi + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [eax + ecx*4]
mov eax, dword [eax + 0x14]
mov ecx, dword [esp + 4]
cmp ecx, dword [eax + ebx]
jne 0x40c540
mov eax, dword [eax + ebx + 4]
mov ecx, eax
and ecx, 0xf7fffff
cmp esi, ecx
jne 0x40c540
and eax, 0x800000
or esi, eax
jmp 0x40c56d
test esi, 0x400000
jne 0x40c56d
mov eax, dword [edi + 0x1064]
mov ecx, dword [eax]
push dword [esp + 4]
push eax
call dword [ecx + 0x10]
mov edx, dword [esp + 0x44]
add esp, 8
mov ecx, esi
or ecx, 0x800000
cmp eax, 2
cmove esi, ecx
cmp dword [esp + 0x1c], edx
jne 0x40c250
mov ecx, dword [esp + 0x58]
cmp ecx, ebp
jne 0x40c250
mov eax, dword [esp + 0x54]
or esi, eax
mov dword [edi + 0x24], eax
mov dword [edi + 0x1c], ecx
mov dword [edi + 0x20], edx
jmp 0x40c250
test eax, eax
mov ebp, dword [esp + 0x1c]
jle 0x40c740
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 4], 0
jmp 0x40c5ef
lea eax, [ecx + ecx*4]
mov eax, dword [esi + eax*4 + 4]
mov dword [esp + 0xc], eax
mov bl, 1
lea eax, [ecx + ecx*4]
mov edx, dword [esp + 0xc]
or edx, 0x3ffff
mov dword [esi + eax*4 + 4], edx
mov eax, dword [edi + 0x12c]
add ecx, 1
cmp ecx, eax
jge 0x40c740
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], eax
mov edx, dword [edi + 0x18]
mov edx, dword [edx + ebp*4]
mov esi, dword [edx + 0x14]
lea edx, [ecx*4]
lea edx, [edx + edx*4]
mov eax, dword [esi + edx]
mov dword [esp + 8], eax
mov edi, dword [esi + edx + 4]
test edi, edi
mov ebp, dword [esp + 4]
cmovs ebp, ecx
mov dword [esp + 4], ebp
movzx eax, bl
mov ebp, 0
cmovs eax, ebp
mov ebp, dword [esp + 0x44]
mov ebx, dword [esp + 8]
cmp ebx, dword [ebp + edx]
mov dword [esp + 0xc], edi
jne 0x40c670
and edi, 0xfffffff
lea ebx, [ecx + ecx*4]
mov dword [esp + 8], eax
mov edx, eax
and dl, 1
cmp edi, dword [ebp + ebx*4 + 4]
je 0x40c6b7
test dl, dl
mov edi, dword [esp]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 8]
je 0x40c67f
jmp 0x40c6c2
mov ebx, dword [esp + 0x14]
test al, 1
mov edi, dword [esp]
mov ebp, dword [esp + 0x1c]
jne 0x40c6b0
mov bl, 1
mov eax, ecx
mov edx, dword [esp + 4]
sub eax, edx
jle 0x40c5cd
lea ebx, [edx + 1]
test al, 1
jne 0x40c6d3
mov eax, edx
cmp ecx, ebx
je 0x40c5c0
jmp 0x40c6f1
mov edx, ebx
and dl, 1
jmp 0x40c6c2
mov edi, dword [esp]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 8]
test dl, dl
mov eax, dword [esp + 0x24]
jne 0x40c5cd
jmp 0x40c5e4
lea eax, [edx + edx*4]
or dword [esi + eax*4 + 4], 0x3ffff
mov eax, dword [edi + 0x18]
mov eax, dword [eax + ebp*4]
mov esi, dword [eax + 0x14]
mov eax, ebx
cmp ecx, ebx
je 0x40c5c0
lea edx, [eax*4]
lea ebx, [edx + edx*4]
nop
nop
nop
nop
nop
or dword [esi + ebx + 4], 0x3ffff
mov edx, dword [edi + 0x18]
mov edx, dword [edx + ebp*4]
mov edx, dword [edx + 0x14]
or dword [edx + ebx + 0x18], 0x3ffff
add eax, 2
mov edx, dword [edi + 0x18]
mov edx, dword [edx + ebp*4]
mov esi, dword [edx + 0x14]
add ebx, 0x28
cmp ecx, eax
jne 0x40c700
jmp 0x40c5c0
mov eax, dword [esp + 0x48]
movzx eax, word [eax]
mov ecx, dword [edi + 0x18]
mov ecx, dword [ecx + ebp*4]
cmp ax, word [ecx]
setne bl
mov word [ecx], ax
mov eax, dword [edi + 0x74]
mov ecx, dword [edi + 0x78]
mov dword [esp + 0x88], ecx
mov dword [esp + 0x84], eax
mov edx, dword [edi + 0x12c]
test edx, edx
jle 0x40d370
mov dword [esp + 0x30], edx
mov esi, ecx
shr esi, 0x10
mov dword [esp + 0x60], esi
mov esi, eax
shr esi, 0x10
mov dword [esp + 0x68], esi
mov dword [esp + 0x50], ecx
shr ecx, 0x18
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x34], eax
shr eax, 0x18
mov dword [esp + 0x64], eax
mov dword [esp + 0x74], 0
xor esi, esi
mov dword [esp + 0x6c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x20], ebx
mov eax, ebx
mov dword [esp + 0x78], eax
xor eax, eax
jmp 0x40c806
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
mov ebp, dword [esp + 4]
mov edi, dword [esp]
add ebp, 1
mov ecx, dword [edi + 0x12c]
mov eax, ebp
mov dword [esp + 0x30], ecx
cmp ebp, ecx
jge 0x40d310
mov dword [esp + 4], eax
mov dword [esp + 0xc], esi
mov eax, dword [esp + 4]
lea eax, [eax*4]
lea ebp, [eax + eax*4]
mov ebx, dword [esp + 0x44]
mov esi, dword [ebx + ebp + 4]
mov eax, dword [edi + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [eax + ecx*4]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x10], eax
mov ecx, dword [eax + ebp + 4]
mov dword [esp + 0x7c], ecx
xor ecx, esi
test ecx, 0x400000
mov eax, dword [esp + 0x78]
movzx eax, al
mov ecx, 1
cmovne eax, ecx
mov dword [esp + 0x78], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x14], esi
mov ecx, esi
xor ecx, dword [esp + 0x40]
test dword [edi + 0x104c], ecx
setne cl
mov edx, dword [esp + 0x34]
cmp byte [ebx + ebp + 8], dl
jne 0x40c8e0
lea esi, [eax + eax*4]
mov edx, dword [esp + 0x34]
cmp byte [ebx + esi*4 + 9], dh
jne 0x40c8e0
mov eax, dword [esp + 0x68]
cmp byte [ebx + esi*4 + 0xa], al
mov eax, dword [esp + 4]
jne 0x40c8e0
mov eax, dword [esp + 0x64]
cmp byte [ebx + esi*4 + 0xb], al
mov eax, dword [esp + 4]
jne 0x40c8e0
mov eax, dword [esp + 0x50]
cmp byte [ebx + esi*4 + 0xc], al
mov eax, dword [esp + 4]
jne 0x40c8e0
mov eax, dword [esp + 0x50]
cmp byte [ebx + esi*4 + 0xd], ah
mov eax, dword [esp + 4]
jne 0x40c8e0
mov eax, dword [esp + 0x60]
cmp byte [ebx + esi*4 + 0xe], al
mov eax, dword [esp + 4]
jne 0x40c8e0
mov eax, dword [esp + 0x5c]
cmp byte [ebx + esi*4 + 0xf], al
mov eax, dword [esp + 4]
je 0x40c8e2
nop
nop
nop
nop
nop
nop
mov cl, 1
mov dword [esp + 0x38], ebp
mov ebp, dword [ebx + ebp]
lea esi, [ebp - 0x23ba]
cmp esi, 4
jb 0x40c90b
test eax, eax
jle 0x40c90d
lea esi, [eax + eax*4]
mov esi, dword [ebx + esi*4 - 0x14]
mov edi, 0xffffdc46
add esi, edi
cmp esi, 3
ja 0x40c90d
mov cl, 1
mov esi, ebp
and esi, 0xfffffc00
mov edi, ebp
and edi, 0xfffffe00
mov dword [esp + 0x24], ebp
mov ebx, ebp
and ebx, 0xffffff00
cmp edi, 0xdc00
mov edi, 0
cmove edi, ebx
cmp esi, 0xd800
cmove edi, ebx
mov dword [esp + 0x18], edi
cmp edi, dword [esp + 0x80]
movzx ecx, cl
mov esi, 1
cmovne ecx, esi
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x38]
lea ebx, [esi + ebp]
lea edi, [eax + eax*4]
mov dword [esp + 0x2c], ebp
cmp dword [ebp + edi*4 + 0x10], 0
je 0x40ca00
mov cl, 1
mov esi, dword [esp + 0x24]
add esi, 0xfffe0e1a
cmp esi, 0x19
mov dword [esp + 8], ebx
mov dword [esp + 0x4c], edi
ja 0x40c9d0
lea esi, [eax + 1]
mov cl, 1
cmp esi, dword [esp + 0x30]
jge 0x40c9ec
mov edx, dword [ebx + 0x14]
mov ebx, 0xfffe0e1a
add edx, ebx
mov ebp, dword [esp + 0x10]
mov edi, dword [ebp + edi*4]
add edi, ebx
cmp edi, 0x19
ja 0x40ca17
lea esi, [esi + esi*4]
mov esi, dword [ebp + esi*4]
add esi, ebx
cmp esi, 0x1a
setb byte [esp + 0x30]
cmp dword [esp + 0x7c], 0
sets bl
and bl, byte [esp + 0x30]
jmp 0x40ca19
test eax, eax
jle 0x40c9ec
mov edx, dword [ebx - 0x14]
mov esi, 0xfffe0e1a
add edx, esi
cmp edx, 0x1a
movzx ecx, cl
mov edx, 1
cmovb ecx, edx
mov dword [esp + 0x30], 0
mov ebp, dword [esp]
jmp 0x40ca30
test eax, eax
jle 0x40c975
cmp dword [ebx - 4], 0
jne 0x40c973
jmp 0x40c975
xor ebx, ebx
mov ebp, dword [esp]
cmp edx, 0x1a
setb dl
xor dl, bl
mov dword [esp + 0x30], edx
mov ebx, dword [esp + 8]
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x10]
cmp dword [ebx], 0xdffe
jne 0x40ca40
mov cl, 1
jmp 0x40ca60
cmp eax, 2
jl 0x40ca60
cmp dword [ebx - 0x14], 0xdfff
jne 0x40ca60
cmp dword [ebx - 0x28], 0xdffe
je 0x40ca3c
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [ebp + 0x106c]
mov dh, byte [edx]
mov ebx, dword [esp + 0x78]
mov dl, bl
and dl, 1
mov bl, dh
or dh, dl
jne 0x40cb10
mov eax, dword [esp + 0x24]
cmp dword [esi + edi*4], eax
jne 0x40cb43
mov eax, dword [esp + 0x7c]
and eax, 0xfffffff
cmp eax, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
jne 0x40cb47
mov byte [esp + 0x10], dl
mov edx, dword [esp + 0x34]
cmp byte [esi + edi*4 + 8], dl
jne 0x40cb3d
cmp byte [esi + edi*4 + 9], dh
jne 0x40cb3d
mov eax, dword [esp + 0x68]
cmp byte [esi + edi*4 + 0xa], al
mov dl, byte [esp + 0x10]
mov dh, bl
jne 0x40cb4f
mov eax, dword [esp + 0x64]
cmp byte [esi + edi*4 + 0xb], al
jne 0x40cb4f
mov ebx, dword [esp + 0x50]
cmp byte [esi + edi*4 + 0xc], bl
jne 0x40cb59
cmp byte [esi + edi*4 + 0xd], bh
jne 0x40cb4f
mov eax, dword [esp + 0x60]
cmp byte [esi + edi*4 + 0xe], al
mov eax, dword [esp + 0x20]
jne 0x40cb60
mov eax, dword [esp + 0x5c]
cmp byte [esi + edi*4 + 0xf], al
mov eax, dword [esp + 0x20]
je 0x40cb1a
jmp 0x40cb60
mov eax, dword [esp + 0x20]
mov dh, bl
test cl, cl
je 0x40cb30
test al, 1
je 0x40cb75
mov al, 1
mov dword [esp + 0x34], eax
jmp 0x40cb84
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x38]
jmp 0x40cc66
mov dl, byte [esp + 0x10]
jmp 0x40cb47
mov eax, dword [esp + 0x20]
mov dh, bl
test al, 1
je 0x40cb64
jmp 0x40cb16
mov eax, dword [esp + 0x20]
test al, 1
je 0x40cb64
jmp 0x40cb16
mov eax, dword [esp + 0x20]
nop
nop
nop
test al, 1
jne 0x40cb16
cmp dword [esp + 0xc], 1
jne 0x40cb16
mov cl, 1
mov dword [esp + 0x34], ecx
test al, 1
jne 0x40cb8b
mov dword [esp + 0x34], 0
test byte [esp + 0x74], 1
je 0x40cbd6
cmp dword [esp + 0xc], 0
jle 0x40cbd6
mov eax, dword [esp + 0x84]
mov esi, dword [esp + 0x88]
mov ecx, ebp
mov ebx, edx
mov edx, dword [esp + 0x48]
push esi
push eax
push dword [esp + 0x48]
push dword [esp + 0x18]
push dword [esp + 0x38]
mov esi, dword [esp + 0x30]
push esi
push dword [esp + 0x84]
call fcn.00418c80
mov edx, ebx
add esp, 0x1c
mov eax, dword [ebp + 0x106c]
mov dh, byte [eax]
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + esi*4]
mov esi, dword [eax + 0x14]
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
add eax, edi
add eax, 8
mov ebp, esi
mov esi, dword [eax]
movzx ecx, byte [esp + 0x74]
mov ebx, dword [eax + 4]
mov dword [esp + 0x88], ebx
mov dword [esp + 0x84], esi
test dh, dh
movzx eax, byte [esp + 0x34]
cmove eax, ecx
mov dword [esp + 0x74], eax
or dl, byte [esp + 0x30]
mov eax, ebx
shr eax, 0x10
mov dword [esp + 0x60], eax
mov eax, esi
shr eax, 0x10
mov dword [esp + 0x68], eax
mov dword [esp + 0x50], ebx
shr ebx, 0x18
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x34], esi
shr esi, 0x18
mov dword [esp + 0x64], esi
mov esi, ebp
mov dword [esp + 0xc], 0
mov eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x80], eax
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov al, byte [esi + edi + 8]
cmp al, byte [ecx + edi + 8]
jne 0x40cd40
mov al, byte [esi + edi + 9]
cmp al, byte [ecx + edi + 9]
jne 0x40cd40
mov al, 1
mov dword [esp + 0x10], eax
mov al, byte [esi + edi + 0xa]
cmp al, byte [ecx + edi + 0xa]
jne 0x40cd46
mov al, byte [esi + edi + 0xb]
cmp al, byte [ecx + edi + 0xb]
jne 0x40cd46
mov al, byte [esi + edi + 0xc]
cmp al, byte [ecx + edi + 0xc]
jne 0x40cd46
mov al, byte [esi + edi + 0xd]
cmp al, byte [ecx + edi + 0xd]
jne 0x40cd46
mov al, byte [esi + edi + 0xe]
cmp al, byte [ecx + edi + 0xe]
jne 0x40cd46
mov al, byte [esi + edi + 0xf]
cmp al, byte [ecx + edi + 0xf]
jne 0x40cd46
lea eax, [esi + edi]
cmp dword [eax], ebp
jne 0x40cd46
mov ecx, dword [esp + 0x4c]
mov ecx, dword [esi + ecx*4 + 4]
xor ecx, dword [esp + 0x14]
test ecx, 0xfffffff
jne 0x40cd46
mov ecx, dword [esp + 8]
nop
nop
nop
nop
nop
mov esi, dword [eax + 0x10]
mov edx, dword [ecx + 0x10]
test edx, edx
sete bl
test esi, esi
je 0x40d24a
test edx, edx
je 0x40cd2d
lea esi, [esi + esi*4]
mov edi, dword [eax + esi*4]
lea eax, [eax + esi*4]
lea edx, [edx + edx*4]
lea esi, [ecx + edx*4]
cmp edi, dword [ecx + edx*4]
mov ecx, esi
je 0x40cd00
mov dword [esp + 0x18], 0
jmp 0x40d261
mov al, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], 0
push 0
push 2
push dword [esp + 0x14]
push 2
lea eax, [esp + 0x9c]
push eax
push edx
call fcn.004362f0
add esp, 0x18
lea ecx, [ebp - 0x10001]
cmp ecx, 0xffffe
ja 0x40cdb0
lea esi, [ebp + 0x3ff0000]
shr esi, 0xa
add esi, 0xffffd800
mov edi, dword [esp + 0xc]
lea ecx, [edi + 1]
mov edx, ebp
and edx, 0x3ff
or edx, 0xdc00
mov word [eax + edi*2 + 2], dx
jmp 0x40cdb8
mov esi, ebp
mov edi, dword [esp + 0xc]
mov ecx, edi
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x2c]
lea edx, [ebx + edx*4]
add edx, 0x10
mov ebx, eax
mov word [eax + edi*2], si
mov edi, ecx
add edi, 1
mov eax, dword [edx]
test eax, eax
je 0x40cef0
mov esi, dword [esp + 8]
mov edx, ebx
jmp 0x40ce0c
mov eax, ebx
mov ecx, edi
mov word [edx + edi*2], ax
mov eax, dword [esi + ebp*4 + 0x10]
lea esi, [esi + ebp*4]
mov edi, ecx
add edi, 1
test eax, eax
je 0x40cee0
lea ebp, [eax + eax*4]
mov ebx, dword [esi + ebp*4]
mov eax, ebx
and eax, 0xffffff00
cmp eax, 0xda00
je 0x40ce50
cmp eax, 0xd900
je 0x40ce70
cmp eax, 0xd800
jne 0x40ce87
mov eax, dword [esp]
mov eax, dword [eax + 0x106c]
movzx ecx, bl
lea eax, [eax + ecx*2]
add eax, 0x20c
jmp 0x40ce84
mov eax, dword [esp]
mov eax, dword [eax + 0x106c]
movzx ecx, bl
lea eax, [eax + ecx*2]
add eax, 0xc
jmp 0x40ce84
mov eax, dword [esp]
mov eax, dword [eax + 0x106c]
movzx ecx, bl
lea eax, [eax + ecx*2]
add eax, 0x60c
movzx ebx, word [eax]
push 0
push 2
push edi
push 2
lea eax, [esp + 0x9c]
push eax
push edx
call fcn.004362f0
add esp, 0x18
mov edx, eax
lea eax, [ebx - 0x10001]
cmp eax, 0xffffe
ja 0x40cdf0
lea eax, [ebx + 0x3ff0000]
shr eax, 0xa
add eax, 0xffffd800
lea ecx, [edi + 1]
and ebx, 0x3ff
or ebx, 0xdc00
mov word [edx + edi*2 + 2], bx
jmp 0x40cdf4
or dword [esp + 0x40], 0x80000000
jmp 0x40cef2
mov edx, ebx
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
test al, al
mov dword [esp + 0x28], edx
jne 0x40cfb8
mov esi, dword [esp]
mov eax, dword [esi + 0x18]
mov ecx, dword [eax + ebx*4]
mov ebp, ebx
mov ebx, dword [esp + 4]
mov edx, ebx
push dword [esp + 8]
call fcn.004181e0
add esp, 4
mov eax, dword [esi + 0x18]
mov edx, ebp
mov eax, dword [eax + ebp*4]
mov eax, dword [eax + 0x14]
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x24]
mov dword [eax + ebp], ecx
mov eax, dword [esi + 0x18]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 0x14]
mov ecx, dword [esp + 0x14]
mov dword [eax + ebp + 4], ecx
mov eax, dword [esi + 0x18]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 0x14]
mov edx, dword [esp + 0x50]
mov dword [eax + ebp + 0xc], edx
mov ecx, dword [esp + 0x34]
mov dword [eax + ebp + 8], ecx
mov eax, edx
shr eax, 0x10
mov dword [esp + 0x60], eax
mov eax, ecx
shr eax, 0x10
mov dword [esp + 0x68], eax
shr edx, 0x18
mov dword [esp + 0x5c], edx
shr ecx, 0x18
mov dword [esp + 0x64], ecx
cmp dword [esp + 0x6c], ebx
jne 0x40cfb0
mov eax, dword [esp]
mov eax, dword [eax + 0x18]
mov ebx, dword [esp + 0x1c]
mov eax, dword [eax + ebx*4]
mov eax, dword [eax + 0x14]
mov ecx, dword [esp + 0x4c]
or dword [eax + ecx*4 + 4], 0x80000000
mov edx, dword [esp + 0x28]
jmp 0x40cfb8
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x1c]
test dword [esp + 0x14], 0x400000
mov esi, edi
je 0x40d055
mov dword [esp + 0xc], esi
mov esi, dword [esp + 4]
add esi, 1
mov eax, dword [esp]
cmp esi, dword [eax + 0x12c]
mov dword [esp + 4], esi
jge 0x40d051
add dword [esp + 8], 0x14
cmp ebx, dword [esp + 0x3c]
jne 0x40d00a
cmp esi, dword [esp + 0x58]
jne 0x40d00a
push 0x1927
push str._home_simon_mem_.build_workdirs_bob_qvbm9mtj_putty_terminal_terminal.c
push str.__i__our_curs_y__j__our_curs_x_
call fcn.004ad8b3
add esp, 0xc
mov eax, dword [esp]
mov eax, dword [eax + 0x18]
mov ecx, dword [esp + 0x1c]
mov ebp, dword [eax + ecx*4]
lea ecx, [esi + esi*4]
shl ecx, 2
add ecx, dword [ebp + 0x14]
mov ebx, dword [esp + 8]
mov edx, ebx
call fcn.00418e30
mov ecx, dword [esp + 0x10]
movzx ecx, cl
test al, al
mov eax, 1
cmove ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, ebp
mov edx, esi
push ebx
call fcn.004181e0
add esp, 4
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 8]
mov eax, dword [eax]
mov ecx, 0xfffe0e1a
add eax, ecx
cmp eax, 0x19
ja 0x40c7e0
mov ecx, dword [esp + 4]
lea ebp, [ecx + 1]
mov eax, dword [esp]
cmp ebp, dword [eax + 0x12c]
jge 0x40d120
mov eax, dword [esp + 8]
mov ebx, dword [eax + 0x14]
lea eax, [ebx - 0x1f1e6]
cmp eax, 0x19
ja 0x40c7e0
or dword [esp + 0x40], 0x400000
push 0
push 2
push esi
push 2
lea eax, [esp + 0x9c]
push eax
push edx
call fcn.004362f0
add esp, 0x18
lea edx, [ebx + 0x3ff0000]
shr edx, 0xa
add edx, 0xffffd800
mov ecx, ebx
and ecx, 0x3ff
or ecx, 0xdc00
mov word [eax + esi*2], dx
mov word [eax + esi*2 + 2], cx
mov ecx, dword [esp + 0x3c]
cmp dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0xc], ebx
jne 0x40d12f
cmp ebp, dword [esp + 0x58]
jne 0x40d12f
mov edx, dword [esp + 0x54]
or dword [esp + 0x40], edx
mov esi, dword [esp]
mov eax, dword [esi + 0x18]
mov eax, dword [eax + ecx*4]
mov ebx, dword [eax + 0x14]
mov eax, dword [esp + 4]
lea ecx, [eax + eax*4]
or dword [ebx + ecx*4 + 4], edx
jmp 0x40d136
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
mov ebp, ecx
jmp 0x40c7ec
mov esi, dword [esp]
mov eax, dword [esp + 4]
mov ebx, dword [esp + 8]
lea ecx, [ebx + 0x14]
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [ecx + edx*4]
mov dword [esp + 0x14], ecx
mov ecx, dword [ecx + 0x14]
lea eax, [eax + eax*4]
mov dword [esp + 4], eax
lea esi, [ebp + ebp*4]
mov dl, byte [ecx + esi*4 + 8]
mov al, 1
mov dword [esp + 0x20], eax
cmp dl, byte [ebx + 0x1c]
jne 0x40d209
mov bl, byte [ecx + esi*4 + 9]
mov eax, dword [esp + 8]
cmp bl, byte [eax + 0x1d]
jne 0x40d209
mov bl, byte [ecx + esi*4 + 0xa]
mov eax, dword [esp + 8]
cmp bl, byte [eax + 0x1e]
jne 0x40d209
mov bl, byte [ecx + esi*4 + 0xb]
mov eax, dword [esp + 8]
cmp bl, byte [eax + 0x1f]
jne 0x40d209
mov bl, byte [ecx + esi*4 + 0xc]
mov eax, dword [esp + 8]
cmp bl, byte [eax + 0x20]
jne 0x40d209
mov bl, byte [ecx + esi*4 + 0xd]
mov eax, dword [esp + 8]
cmp bl, byte [eax + 0x21]
jne 0x40d209
mov bl, byte [ecx + esi*4 + 0xe]
mov eax, dword [esp + 8]
cmp bl, byte [eax + 0x22]
mov eax, dword [esp + 8]
jne 0x40d209
mov bl, byte [ecx + esi*4 + 0xf]
cmp bl, byte [eax + 0x23]
jne 0x40d209
lea edx, [ecx + esi*4]
mov eax, dword [esp + 0xc]
cmp dword [edx], eax
mov eax, esi
mov esi, edi
jne 0x40d26a
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov edx, dword [esp + 4]
mov esi, dword [ecx + edx*4 + 4]
mov ebx, eax
xor esi, dword [ecx + eax*4 + 4]
test esi, 0xfffffff
je 0x40d26e
mov edi, dword [esp]
mov esi, dword [esp + 0xc]
jmp 0x40d210
mov ebx, esi
mov esi, edi
mov edi, dword [esp]
mov ecx, dword [esp + 0x14]
add esi, 2
mov edx, ebp
push dword [esp + 0x24]
call fcn.004181e0
add esp, 4
mov eax, dword [edi + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [eax + ecx*4]
mov eax, dword [eax + 0x14]
mov ecx, dword [esp + 4]
mov ecx, dword [eax + ecx*4 + 4]
mov edx, 0x7fffffff
and ecx, edx
mov dword [eax + ebx*4 + 4], ecx
jmp 0x40c7ef
mov dword [esp + 0x18], ebx
test edx, edx
movzx ecx, byte [esp + 0x20]
mov eax, 1
cmovne ecx, eax
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x28]
jmp 0x40cd4e
mov ebx, eax
jmp 0x40d20d
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 8]
nop
nop
mov dword [esp + 8], eax
mov eax, dword [eax + 0x10]
mov edx, dword [esp + 0xc]
mov esi, dword [edx + 0x10]
test eax, eax
je 0x40d2ec
test esi, esi
je 0x40d2ff
lea eax, [eax + eax*4]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 8]
mov eax, dword [edx + eax*4]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 8]
lea eax, [edx + eax*4]
mov dword [esp + 8], eax
lea eax, [esi + esi*4]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0xc]
lea eax, [edx + eax*4]
mov dword [esp + 0x38], eax
mov esi, dword [esp + 0x4c]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0xc]
cmp esi, dword [eax + edx*4]
mov eax, dword [esp + 8]
mov edx, dword [esp + 0x38]
mov dword [esp + 0xc], edx
je 0x40d280
jmp 0x40d2ff
test esi, esi
movzx eax, byte [esp + 0x10]
mov edx, 1
cmovne eax, edx
mov dword [esp + 0x20], eax
mov esi, edi
mov edi, dword [esp]
jmp 0x40d214
test byte [esp + 0x20], 1
mov ebp, dword [esp + 0x44]
je 0x40d374
test esi, esi
jle 0x40d374
mov eax, dword [esp + 0x84]
mov edx, esi
mov esi, dword [esp + 0x88]
mov ecx, edi
mov ebp, edi
mov edi, edx
mov ebx, dword [esp + 0x48]
mov edx, ebx
push esi
push eax
push dword [esp + 0x48]
push edi
mov edi, ebp
mov ebp, dword [esp + 0x54]
push dword [esp + 0x38]
push dword [esp + 0x30]
push dword [esp + 0x84]
call fcn.00418c80
add esp, 0x1c
cmp byte [ebx + 0xc], 0
jne 0x40c1b0
jmp 0x40c1c4
mov ebp, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
cmp byte [ebx + 0xc], 0
jne 0x40c1b0
jmp 0x40c1c4
push ebp
call fcn.004362e0
add esp, 4
push dword [esp + 0x28]
call fcn.004362e0
add esp, 4
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.0049e0f0
add esp, 0x94
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [esp + 4]
mov eax, dword [esi + 0x14]
test ebx, ebx
jg 0x40c0cc
jmp 0x40c0dd